Git Product home page Git Product logo

Comments (7)

ahocevar avatar ahocevar commented on August 27, 2024

This is not an issue with ol-mapbox-style. You'll need to modify your babel and/or webpack configuration to support ES2015 features like class. In addition, the config also needs to strip flow types (which are used by some dependencies).

For inspiration, take a look at the lib's .babelrc and webpack.config.js.

from ol-mapbox-style.

nicky-dev avatar nicky-dev commented on August 27, 2024

I got same problem.
in Version 3.0.0-beta.7 - work fine (no need to config anything)

but in Version 3.0.1 - ERROR !!!!

image

from ol-mapbox-style.

ahocevar avatar ahocevar commented on August 27, 2024

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.

from ol-mapbox-style.

nicky-dev avatar nicky-dev commented on August 27, 2024

how to solve it. if babel version is different.

"@babel/core": "7.0.0-beta.42",

.babelrc
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-flow"
],
"plugins": [
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime"
]
}

from ol-mapbox-style.

ahocevar avatar ahocevar commented on August 27, 2024

@nicky-dev babel-plugin-transform-flow-strip-types is available for Babel 7, see https://www.npmjs.com/package/@babel/plugin-transform-flow-strip-types. It should be enough to add it to your plugins config section.

from ol-mapbox-style.

nicky-dev avatar nicky-dev commented on August 27, 2024

Now it's work with this webpack config ...

image

thank you @ahocevar

from ol-mapbox-style.

fatalcaron avatar fatalcaron commented on August 27, 2024

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 ?

from ol-mapbox-style.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.