Ich klonte Projekt von Tour of Heroes Tutorial https://angular.io/docs/ts/latest/guide/setup.html.Trennen von TypeScript und JavaScript-Dateien
Und ich möchte .js-Dateien in ein anderes Verzeichnis trennen, weil ich jetzt .ts, .js und .js.map-Dateien alle zusammen in einem Verzeichnis habe.
habe ich versucht, es aus nach der Antwort lösen: Separate Angular2 TypeScript files and JavaScript files into different folders, maybe 'dist‘ aber nach Änderungen in systemjs.config.js und tsconfig.json ich einen Fehler:
Failed to load resource: the server responded with a status of 404 (Not Found)
localhost/:18 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/app/app.module
Error: XHR error (404 Not Found) loading http://localhost:3000/app/app.module
at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:1056:39)
at ZoneDelegate.invokeTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:424:31)
at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:191:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:486:38)
Error loading http://localhost:3000/app/app.module as "./app/app.module" from http://localhost:3000/main.js
at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:1056:39)
at ZoneDelegate.invokeTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:424:31)
at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:191:47)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:486:38)
Error loading http://localhost:3000/app/app.module as "./app/app.module" from http://localhost:3000/main.js
welche IDE verwenden Sie? – alehn96
Visual Studio Code – user
Die meisten Editoren werden '.js' und' .js.map' 'gefaltet' und ausgeblendet, wenn sie feststellen, dass Typoskript verwendet wird. Heutzutage ist es nicht oft in einem anderen Verzeichnis, wie du es beschreibst. – Raven