So I tried to import a node module (immutablejs) into my typescript file:
/// <reference path="../node_modules/immutable/dist/immutable.d.ts" />
import { Map } from 'immutable';
var myMap = Map();
Here are my script tags in my index.html:
<script src="node_modules/systemjs/dist/system.js"></script>
<script src="node_modules/typescript/lib/typescript.js"></script>
<script>
System.config({
transpiler: 'typescript',
packages: {
src: {
defaultExtension: 'ts'
}
}
});
System
.import('src/main.ts')
.then(null, console.error.bind(console));
</script>
While intellisense is working in VS Code, my browser tells me it cannot find immutable: system.src.js:1057 GET http://localhost:3000/immutable/ 404 (Not Found)
Importing a self-written typescript module with relative path just worked out fine..
What am I doing wrong?