0

I used to uglify and hash my js files. Then I wanted to rewrite my js file using .

I only started with two files, search.js and select.js, (amongst dozens) that depend on each other.

My run the conversion and then the uglify task.

runs without errors.

When I try my website, in the browser console I see this error

Uncaught ReferenceError: exports is not defined

search.js contains the export statement and select.js contains the export statement as well and the import to import exported search.js

How do I fix this given that I'm using and all my js files are aggregated into one final uglified file?

I've read this post, it gives great answers on what's going on but it does not suggests any grunt solution.

smarber
  • 4,829
  • 7
  • 37
  • 78

0 Answers0