-
Notifications
You must be signed in to change notification settings - Fork 41
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
Running ng build with optimization set to true breaks this library #442
Comments
This library doesn't have any side-effecting getters. It has a bunch of getters, but they are pure. At least, I have ripgrepped the codebase pretty hard and examined the ones it has. If you can find one yourself, let me know. If it's a getter problem, it's either upstream ( It's not necessarily a getter problem, though. I'll think about what else it could be. |
Hey, thank you for the quick response! I checked our code, and there is not a single place where we call |
I also did a quick search in dnd-core, and found this issue that is atleast somewhat similar: react-dnd/react-dnd#1049 Will have another, better, look tomorrow. |
So this morning I did some searching around and I found more issues on Some related issues on |
Wew, after what looked like it was turning into a very big headache this morning turned out pretty great, I found a workaround! Basically it boils down to not using UglifyJS as minimizer in webpack, as that somehow breaks something somewhere related to using drag and drop (in skyhook). Instead I switched to using
And it works! :D Patch file used:
|
You should probably run your (unfixed) code in a debugger with pausing on exceptions enabled (and source maps). Then you’ll know where it actually is. |
Closing because the examples still work with |
Problem
Apperantly setting
"optimzation": true
in angular.json causes an app that functions normally without optimization (i.e. debug/development) to break with optimization (production mode).Since Angular's stance on the matter is pretty much that the library should fix it, I'm posting an issue for it here.
Steps to reproduce:
"optimzation": true
(i.e.ng build --prod
)Error in console:
Versions
Angular cli
7.2.2
Skyhook
1.2.1
Expected result
App works the same with optimization enabled or disabled.
Workaround
Disable optimization by setting
"optimization": false
inangular.json
Request
Make this library work with optimization set to true.
The text was updated successfully, but these errors were encountered: