Closed alienlike closed 7 years ago
Do you get the exact line number of the unexpected token? Also give some more information on how to reproduce this issue:
Currently trying to get the example running but have not been successful due to #30.
The exception occurs on line number 1 of dist/index.js
, which is bundled into vendor.js
with Webpack. I am not using AOT.
I'm importing as follows:
import { AngularOpenlayersModule } from 'angular2-openlayers';
in my moduleimport { MapComponent, ViewComponent, LayerVectorComponent } from 'angular2-openlayers';
in my component@quentin-ol, @FallenRiteMonk Thanks for helping me out. I'm developing two apps concurrently, both using Angular 2 and OpenLayers. One is a fairly trivial map-based app, the other a significant effort that will be developed over a few years and eventually see thousands of users. I'm submitting PRs as I need new features, and will try to conform them to your vision for this project. I'm new to the entire stack (including OpenLayers), so I appreciate your help and patience. Hopefully as I learn more I can be an asset to the project.
@alienlike My pleasure to help! As for the "vision" of the project, all opinions are welcome (encouraged even). Confronting ideas and proposals is always the best way forward so don't censor yourself, push PRs and let's find ways to get those features in the library! Thanks again!
If I remove the line "module": "es2015"
from tsconfig.json
, the issue goes away.
Per https://www.typescriptlang.org/docs/handbook/compiler-options.html, module values "ES6" or "ES2015" may not be used in tandem with target "ES5".
update: Investigating this next week.
should be fixed with 0.5.0
I'm getting an
unexpected token import
exception in Chrome due to the following code inindex.js
:It seems like this started happening with the change to
ngc
but I'm not really sure.