I have edited the system.js.config.js to output the js files to a different folder with
map: {
// our app is within the app folder
'app':'dist/app',
and also changed the tsconfig.json to
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [ "es2015", "dom" ],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "dist"
}
Now with the above the js files are outputted in the dist folder keeping the app folder clean with only the typescript files
Now the js files are correctly loaded but when i use templateurl in the component template it always refers to the dist folder that is
@Component({
moduleId: module.id,
selector: 'hero-form',
templateUrl: 'hero-form.component.html'
})
The above is resolved by having to copy the hero-form.component.html to the dist folder Is there another workaround without having to copy the html to dist folder since this means there will always be code repetition