error: js/dist/app.js from UglifyJs Unexpected token: name (Dom7)


What you did
I have installed Swiper as normal dependency in my Project and import it to my scripts file like this import Swiper from 'swiper';
If I try to bundle it to a production ready version with webpack i get this error

Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:14,0][js/vendor.a8b881e4dc98829fb5c4.js:36577,6]

ERROR in js/vendor.a8b881e4dc98829fb5c4.js from UglifyJs
Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:14,0][js/vendor.a8b881e4dc98829fb5c4.js:36577,6]
as soon as I downgrade Swiper to version 3.4.2 everything works as expected.

Expected Behavior
Bundling and compression via webpack is working

Actual Behavior
UglifyJS throws an error because of dom7

 降級swiper版本 到3.4.2


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM