I attempted to import a node module called immutablejs into my TypeScript file:
/// <reference path="../node_modules/immutable/dist/immutable.d.ts" />
import { Map } from 'immutable';
var myMap = Map();
Here are the 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>
Although intellisense is working in VS Code, my browser is indicating that it cannot find immutable: system.src.js:1057 GET http://localhost:3000/immutable/ 404 (Not Found)
Importing a self-written TypeScript module with a relative path worked perfectly fine..
What could be the issue here?