Webpack Syntax Error
See original GitHub issueHi,
I am facing problem using multiselect beta version with webpack. More information:
ERROR in ./~/vue-multiselect/lib/vue-multiselect.min.js
Module build failed: SyntaxError: 'with' in strict mode (1:29119)
at Parser.pp$4.raise (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp$1.parseWithStatement (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:932:27)
at Parser.pp$1.parseStatement (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:708:32)
at Parser.pp$1.parseBlock (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:981:25)
at Parser.pp$3.parseFunctionBody (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:2105:24)
at Parser.pp$1.parseFunction (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1065:10)
at Parser.pp$3.parseExprAtom (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1810:19)
at Parser.parseExprAtom (/Users/ralee/Public/projects/helixtap/node_modules/buble/dist/buble.umd.js:656:26)
at Parser.pp$3.parseExprSubscripts (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1715:21)
at Parser.pp$3.parseMaybeUnary (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1692:19)
@ ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/settings/account.vue 129:0-41
@ ./resources/assets/js/components/settings/account.vue
@ ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/setting-base.vue
@ ./resources/assets/js/components/setting-base.vue
@ ./resources/assets/js/setting.js
Is there a work around for this? Please advice.
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (8 by maintainers)
Top Results From Across the Web
Webpack Build SyntaxError: Unexpected token - Stack Overflow
Webpack Build SyntaxError: Unexpected token ) ; import React from ; function App ; <div> <h2>Welcome to My new React App</h2> <h3>Date :...
Read more >"SyntaxError: Unexpected token ." in webpack script · Issue #64
Hello, I have the following configuration: node 10.16.0 electron 3.0.2 webpack 4.20.2 webpack-node-externals 1.7.2 When adding the line ...
Read more >Syntax Error: Unexpected token while bundling with webpack
Note: The error happens when K6 is run, and not during the build process. I have tinkered around using some information from external...
Read more >Webpack lesson - Uncaught SyntaxError: Unexpected token ...
Why do I get "Uncaught SyntaxError: Unexpected token import"? Compiling works ok. I am doing this lessons https://laracasts.com/series/webpack-for-everyone/ ...
Read more >Unhandled Runtime Error SyntaxError: Unexpected token ...
`1 of 1 unhandled error Unhandled Runtime Error SyntaxError: ... /app-node/.next/static/chunks/webpack.js (37:37) eval [native code] .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@talvbansal Not yet. Please use the workaround:
import Multiselect from 'vue-multiselect/lib/Multiselect.vue'
Vue uses
with
for its own render functions. It was a design decision.If that turns out to be a problem with e.g. ES6 modules in webpack 2, we might have to find some solution for this part of the codebase.
But as I’m not sure yet weithet this is is the case, please continue to investigate in your own as well.