Vue-multiselect: Webpack build error using default vue-cli project build tools

Created on 30 May 2016  路  6Comments  路  Source: shentao/vue-multiselect

vue-cli project

Running the dev server works fine but when i run build:

cross-env NODE_ENV=production webpack --progress --hide-modules

i get this error:

ERROR in build.js from UglifyJs
Unexpected token punc 芦(禄, expected punc 芦:禄 [./~/vue-multiselect/src/mixins/multiselectMixin.js:19,0]
bug enhancement

All 6 comments

Hey @HParton!
Please go to node_modules/vue-multiselect/src/mixins/muliselectMixin.js and change the 19 line from:
data () {
to
data: function () {
and let me know if that helps. And any other shorthand if necessary.
If this helps, it would mean that uglify.js has some problems with shorthand method definition.

This is no big deal, so I could fix it soon. :)

@HParton Hey! I refactored the way one can import the component (now a bundled umd module), so none of those errors should happen.

I will try to release it as 0.2.0 today evening.
Additionally, you can now import mixins like import { multiselectMixin } from 'vue-multiselect'.

Hey @shentao, thanks for doing that, sorry i went quiet on the issue. Got distracted and then forgot about it!

I'll give it a test when you release the new version.

@hparton Released!

Working perfectly, no more errors. Thanks @shentao.

I鈥檓 glad to hear that @HParton!
Let me know if there are other bugs or ways to improve!

Was this page helpful?
0 / 5 - 0 ratings