When I was using Angular2 pre-releases I had to use systemjs in order to use external javascript libraries, namely ESRI ArcGIS JavaScript API, which is based on AMD modules (typings are available though).
Now I would like to migrate to Angular2 CLI. However, I fail to see how I can import an external library like arcgis after Angular2 moved from systemjs to webpack and without having a webpack.config file to modify.
The external library is stored under:
<script src="https://js.arcgis.com/3.19/"></script>
Example: In my angular components, I somehow need to be able to import these like:
import map from 'esri/map';
to import 'https://js.arcgis.com/3.19/esri/map.js'
Any idea how this can be accomplished?
Edit: If I add the link to the map.js to the angular-cli.json
"scripts": [
"../node_modules/jquery/dist/jquery.js",
....
"https://js.arcgis.com/3.19/esri/map.js"
],
and import it as import {map} from 'esri/map';
I'm getting a webpackMissingModule: C:\Users\xy\project\src\https:\js.arcgis.com\3.19\esri\map.js