I have a project in typescript / Webpack that is working fine. I am now trying to create a component
that uses openlayers 5 and unfortunately the types for that library are broken at this point and there
is little documentation so I decided just to use ESNext for that component.
However, I am getting the error
Module parse failed: Unexpected character ‘@’ (40:0)
You may need an appropriate loader to handle this file type.
|
@inject( …
Do I need todo something to the webpack config to allow ESNext js ?
I see. I think it has something todo with your babel webpack configuration. It seems the required plugins/presets necessary for babel to understand the decorators are not there? Can you try search in that direction?
i’m still on openlayers 4.x because of their typing issues. i think the upcoming version is supposed to have most of the issues worked out and should be out soon.