Vee-validate: locales .js production build error from UglifyJs

Created on 31 Jan 2017  路  1Comment  路  Source: logaretm/vee-validate

Versions:

  • VueJs: 2.1.10
  • Vee-Validate: 2.0.0-beta.21

Description:

I use webpack to build.
all works fine, but I get an error in production build of the locales:

js/ar.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./~/vee-validate/dist/locale/ar.js:
2,0][js/ar.js:85,30]

Is there a custom loader do convert that syntax, or is it a bug from UglifyJs?

Steps To Reproduce:

Most helpful comment

It is because the locales are in es6 so uglify won't be able to properly handle them, until I Figure a good way to bundle them, you are going to have to download the locales you need and copy them to your project source, and allow babel-loader to process them.

import ar from './strings/validations/ar';

because they are in node_modules, babel-loader typically doesn't process them because of the exclude option.

>All comments

It is because the locales are in es6 so uglify won't be able to properly handle them, until I Figure a good way to bundle them, you are going to have to download the locales you need and copy them to your project source, and allow babel-loader to process them.

import ar from './strings/validations/ar';

because they are in node_modules, babel-loader typically doesn't process them because of the exclude option.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Youdaman picture Youdaman  路  3Comments

7immer picture 7immer  路  3Comments

parweb picture parweb  路  3Comments

MaxMilton picture MaxMilton  路  3Comments

DanielPe05 picture DanielPe05  路  3Comments