Javascript error


Topic: Javascript error

wondernate pro premium priority asked 12 months ago

I am trying to use the source files and minify them myself. I am getting an error on the js file. I have tried using the mdb.pro.es.js file and the mdb.pro.umd.js file. After compiling and running them I get this error:

mdb.pro.es.es5.min.js:1 Uncaught ReferenceError: exports is not defined at mdb.pro.es.es5.min.js:1:110

Here is the line from the JS file: Object.defineProperty(exports, "__esModule", { value: !0 });

Expected behavior Site is able to use minified js file

Actual behavior Error when using js file.

Resources (screenshots, code snippets etc.)


Grzegorz Bujański staff answered 12 months ago

I need more information. What tool do you use to minify files? Do you use a bundler, e.g. Vite or Webpack? What does your setup look like?


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.1.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: No