Closed rico closed 6 years ago
I have found a solution - had to add the modules with es6 in it to webpack.base.conf.js
{
test: /\.js$/,
loader: 'babel-loader',
include: [
resolve('src'),
resolve('test'),
resolve('node_modules/vue-authorize'), // es6 module
resolve('node_modules/animated-vue') // es6 module
]
},
Additionally - for animated-vue
, I had to install babel-preset-latest
(throws some deprecation warnings when it installs).
Maybe there are better ways?
When I run
npm run build
, I get the following error:I seems like babel is not transpiling
./node_modules/vue-authorize/src/utils.js
(when I look at the generated vendor JS the whole package is no transpiled - alllet
etc still there) and UglifyJS does not understand es6.Since I have no deeper knowledge of babel etc. I did not change any configuration files (except for names / meta information).