Skip to content
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

Build Issue : UglifyJs SyntaxError: Unexpected token: name #1

Closed
grempe opened this issue Aug 31, 2016 · 2 comments
Closed

Build Issue : UglifyJs SyntaxError: Unexpected token: name #1

grempe opened this issue Aug 31, 2016 · 2 comments

Comments

@grempe
Copy link

grempe commented Aug 31, 2016

Using version 1.0.6 If I build my app, which I just recently added this plugin to, I see the following build error:

$ npm run build

> thesplit@1.0.0 build /Users/glenn/src/github/thesplit-vue
> cross-env NODE_ENV=production webpack --progress --hide-modules

Hash: 2b489f2de83e4914b8e1
Version: webpack 1.13.2
Time: 4367ms
       Asset     Size  Chunks             Chunk Names
    build.js  1.12 MB       0  [emitted]  main
build.js.map  1.39 MB       0  [emitted]  main

ERROR in build.js from UglifyJs
SyntaxError: Unexpected token: name (find) [./~/vue-resource-case-converter/src/vue-resource-case-converter.js:7,0]

If I comment out the import and registration of vue-resource-case-converter the build works fine.

// import VueResourceCaseConverter from 'vue-resource-case-converter'
...
// Vue.use(VueResourceCaseConverter)
...

Any thoughts? I'd hate to have to pull this out, or do it manually in the response, (I just refactored my server to use snake_case is it should).

Here is the app that's failing (as of commit bfafb1fc47e255939c0ff7c3f6ed2b0ee949f753):

https://github.com/thesplit/thesplit-vue

@staskjs
Copy link
Owner

staskjs commented Sep 1, 2016

I shouldn't have used es6 version as main file, because usually node_modules is excluded from babel compilation. I changed main file to compiled one. Please update.

@staskjs staskjs closed this as completed Sep 4, 2016
@grempe
Copy link
Author

grempe commented Sep 6, 2016

Works great now for me. Thanks!

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

No branches or pull requests

2 participants