Comments (8)
I've tried the builtin UglifyJS in the latest Webpack. I also tried the beta version of latest UglifyJS 3 (which uses Harmony). It got past the error, but instead I have mangling issues which probably relates to how Uglify handles mangling of node_modules folder (mangle: false
seems to ignore node_modules folder).
from dropkick.
I am getting this error as well, using DropKick in congregation with roots' Sage 9 beta 4.
ERROR Failed to compile with 1 errors scripts/main_678f8f2f.js from UglifyJs Unexpected token: name (_docListener) [scripts/main_678f8f2f.js:3142,4]
from dropkick.
Ah crap. It's because uglify 2.x and below can't handle ES6 classes. So there are two options here:
- Upgrade to uglify 3
- Transpile the DK class before going through uglify (
exclude: /node_modules\/(?!(dropkickjs)\/).*/
)
Honestly neither of those are awesome and I didn't know consuming projects would have to explicitly include this module in their transpilation... Changes will have to be made.
from dropkick.
Interesting. Are you using the already minified version in your project or importing the module?
from dropkick.
@Robdel12 - I'm importing from NPM. Every other node modules can be bundled together with UglifyJS, just not DropKick.
from dropkick.
What version of webpack and uglify? I use uglify to compile the built version
from dropkick.
@Robdel12 - I'll stay with a min.js file in the meanwhile. Just to keep things simple. Thank you for getting into it!
from dropkick.
@Robdel12 I ended up excluding the dropkick class, should be good as a temp fix. Thanks for the solution!
from dropkick.
Related Issues (20)
- IE11 Issue: Change event. HOT 2
- Disabled state isn't relayed to the screen reader
- Multiselects on mobile are broken
- Disabled optgroup not detected
- Classes added to the combobox are removed on select HOT 4
- Select with all options disabled breaks HOT 1
- JAWS 17 not reading dropkick dropdown
- this object doesn't support this property or method dropkick HOT 1
- How to handle autocomplete
- This isn't really an issue, but HOT 1
- Not working on IE 11 HOT 2
- TypeError default is not a constructor HOT 5
- Cross-Origin blocking on forms using dropkick HOT 1
- Using an icon font displays unexpected results HOT 12
- toggleClass throws "is not a function" HOT 2
- Hiding the Selected Option From the Dropdown List HOT 7
- Bubble Option not triggering change on the native select HOT 1
- Accessibility issue HOT 1
- Dropkick does not correctly handle selects with optgroups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropkick.