Closed hackuun closed 6 years ago
I even doesn't see where Uglify comes from in webpack template, I see no related plugins.
That would be here
I can't find the answer how to solve it.
You already commented two different closed issues where solutions were provided. You have to adjust the babel-loader's include paths here so that the source will be transpiled to ES5
@LinusBorg cool, but if I add resolve('node_modules/menu-aim')
then I got other kind of Error
ERROR in ./~/menu-aim/src/index.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "/home/***/Documents/WORK/EXAMPLES/vue-examples/node_modules/menu-aim"
Babel-loader finds the .babelrc
file in that packages folder and tries to use its settings for transpilation, but that package is not installed because the webapck template uses a different one.
Sidenote: The menu-aim
package wasn't the one producing the errror, was it? That package appears to provide an ES5 build (it has a .babelrc
file with the es2015 preset, after all...).
But: Your OP seems to indicate that vue-particles
is the problem, so you should include resolve('node_modules/vue-particles')
. As this package has no babel config, you won't have a conflict of configs like you have with that menu-aim
package.
Edit: I just saw that I already cam across this package before: https://github.com/creotip/vue-particles/issues/7#issuecomment-330031021
The best solution would be if the author of the package simply ran npm run build
and changed the main file of the package to the built file instead of the source.
@LinusBorg I had errors with both of this packages. It worked with vue-particles
, but menu-aim
throws this error.
Well, then that seems to be a problem of that package - its code isa ppearantly not completely transpiled to ES5, even though it appears it should.
Thanks, @LinusBorg
How to solve it? Someone? I have same problem!
Hello. I got an error with one of the packages
vue-particles
when building the project. It's because it's using ES6 syntax I guess. I can't find the answer how to solve it. I even doesn't see where Uglify comes from inwebpack
template, I see no related plugins.Can somebody help?