Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

ERROR in app.ios.js from UglifyJs #45

Closed
Qanah opened this issue Apr 25, 2018 · 3 comments
Closed

ERROR in app.ios.js from UglifyJs #45

Qanah opened this issue Apr 25, 2018 · 3 comments

Comments

@Qanah
Copy link

Qanah commented Apr 25, 2018

install nativescript-localstorage
then require("nativescript-localstorage"); in main.js

then watch:ios i got something like this

ERROR in app.ios.js from UglifyJs
Unexpected token: name (localStorageData) [app.ios.js:17875,8]

after some search i found the UglifyJs work only on es5 i don't know if this is the problem
but if this error have side effect please help me to find solution i don't have good experience in webpack

@Qanah
Copy link
Author

Qanah commented Apr 28, 2018

Please any one can help wen i commit the exclude node_modules from webpack rules the error disappear that mean i need to convert all the src and his dependence to es5 and then the UglifyJs
will work without any error

//exclude: /(node_modules)/,

but any one can help me if there is any issue in my work because in main.js you need to use nativescript-plugins and that plugins is under node_modules directory then the babel-loader will add it without transform it to es5

@damiani
Copy link

damiani commented May 24, 2018

There's are a couple of threads (webpack/webpack#2972 and joeeames/WebpackFundamentalsCourse#3 (comment)) which discuss this issue, but one solution that worked for me in a similar situation is in this comment ... basically, updating the Uglify plugin that Webpack uses by default.

@rigor789 rigor789 closed this as completed Sep 6, 2018
@nativescript-vue nativescript-vue locked as resolved and limited conversation to collaborators Sep 19, 2018
@nativescript-vue-bot
Copy link
Collaborator

We are locking this issue because it has been closed for more than 14 days.

If the issue comes up again please open a new issue with additional details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants