-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack Module parse failed #89
Comments
This is not an issue with For inspiration, take a look at the lib's .babelrc and webpack.config.js. |
Correct. The new expression parser was introduced with v3.0.0-beta.9. Make sure you use e.g. babel-loader or buble-loader for ol-mapbox-style's dependencies. |
how to solve it. if babel version is different. "@babel/core": "7.0.0-beta.42", .babelrc |
@nicky-dev |
Now it's work with this webpack config ... thank you @ahocevar |
I have the same issue with Angular 6. I try to target es2015 in my tsconfig but it still doesn't work. Any advice for Angular user ? |
Version
3.0.0-beta.7 - work fine
but "ol-mapbox-style": "^3.0.0-beta.9" - generate errors
ERROR Failed to compile with 7 errors13:15:45
error in ./node_modules/@mapbox/mapbox-gl-style-spec/util/color.js
Module parse failed
: Unexpected token (17:5)
You may need an appropriate loader to handle this file type.
| */
| class Color {
| r: number;
| g: number;
| b: number;
@ ./node_modules/ol-mapbox-style/index.js 23:0-60
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/pages/OlMap/OlMap.vue
@ ./src/components/pages/OlMap/OlMap.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?https://localhost:8080 webpack/hot/dev-server ./src/main.js
and etc. see atachment
rr.txt
The text was updated successfully, but these errors were encountered: