vue-multiselect: Webpack Syntax Error
Hi,
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.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (8 by maintainers)
@talvbansal Not yet. Please use the workaround:
import Multiselect from 'vue-multiselect/lib/Multiselect.vue'Vue uses
withfor 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.