-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems Uglifying the code #51
Comments
Hi, yeah, my linter also has complained about this... |
The only thing I could think of is to put the function at the root of the parent function as a generator to add additional closures on it.
and then generate the function when you need it. |
Ok, I will see in a few days what can I do |
Currently I had to remove it from my project because I couldn't figure out a way to make it work in my webpack setup :-( |
Do you use deepdash-es with a webpack? |
I have not, I could check. Basically what happened was that our build suddenly broke and I traced it down to this module. I figured it would be good to know on your side and I have looked for a quick fix on my side. Will definitely check the -es version, we were using just "npm install deepdash" but I did not specifically configure webpack to use the es files. Thanks for all your help. |
I don't know if it will help with uglifier, but probably it should: Another good reason to use es version is theoretically supported tree shaking. btw I am going to fix this issue, maybe just by instructing rollup to not make things harder or I'll find some time for refactoring |
Could you, please share your config for uglifyi? |
Hey, I tried to replace function declaration by assignment it to variable and eslint was satisfied. |
We are seeing code which are incompatible with "use strict"
ERROR in js/vendors~ui.8f578b013cec78bc290e.js from UglifyJs In strict mode code, functions can only be declared at top level or immediately within another function. [./node_modules/deepdash/private/getIterate.js:101,8][js/vendors~ui.8f578b013cec78bc290e.js:186542,8]
at deepdash/private/getIterate.js:101
The text was updated successfully, but these errors were encountered: