Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Unable to bundle mdb.min.js with other .js files

hraud priority asked 5 years ago


To reduce the number of files downloaded to the browser, I am trying to bundle mdb.min.js with my other js files.

However, when I try to do so in Visual Studio, I get numerous errors in mdb.min.js: "strict-mode does not allow assignment to undefined variables".

It appears that there are several undefined variables in mdb.js even though strict mode has been declared in mdb.js. This is causing the bundling and minification to fail.

I could work around this by editing mdb.js to either declare the variables or remove the "use strict" statements, but this should be fixed by the MDB team.

Resources (screenshots, code snippets etc.) Error list


hraud priority answered 5 years ago


I use Visual Studio's bundler and minifier: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BundlerMinifier

However, I have run mdb.js through eslint at https://eslint.org/demo, and it finds a lot more issues than the 19 errors that are preventing bundling from working in my projects.


Piotr Glejzer staff commented 5 years ago

we already re-write our dev repo to jQuery. We will update this repo with the best standards and technologies available in extensions like npm/webpack/eslint etc. Thanks for the report btw. Have a nice day.


Piotr Glejzer staff answered 5 years ago


Hello,

Thanks for the message. I added the task to that. We will check it as soon as possible. Did you use another cool extension to check it? Like eslint or something like that?

Best, Piotr



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: 4.9.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No