У меня есть проект angular4 + MVC.
У меня есть папка dist, сгенерированная в angular с помощью команды ng build --prod
в cli.
Я хочу удалить узловые модули и вернуть только эти dist-файлы для производства.
Моя проблема заключается в том, как я могу указать, чтобы начать выполнение, используя папку /dist вместо модулей /node.
В настоящее время я использую system.import() из моего layout.cshtml (в mvc) для импорта модуля приложения angular.
<script>
System.import('app/main.js').catch(function (err) { console.error(err); });
Also what should be the content in systemjs.config file since my intention is to eliminate node modules, and presently ** systemjs.config ** points to open node modules folder.
(function (global) {System.config({
paths: {
'npm:': 'node_modules/'
},
map: {
'app': 'app',
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
и т.д.
Любая помощь будет высоко оценен.