After setting up my tsconfig file to build a frontend typescript application with a single output structure, I encountered an unexpected issue:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"lib": [
"es2015",
"es2015.iterable",
"dom"
],
"sourceMap": true,
"outFile": "output.js",
"strict": true
}
}
To load the output in the browser, I utilized <script>
tags and incorporated systemjs [https://jspm.io/[email protected]], along with the snippet below for bootstrapping the application:
SystemJS.import("Application")
.then((module) => {
console.log(module);
})
.catch((error) => {
console.error(error);
});
Despite my expectation that all npm dependencies would be integrated into the output.js
file during compilation, inspection revealed that the browser was attempting to load the lodash
module from
https://registry.jspm.io/lodash.js