In your angular.json, how would you output multiple .js files into your dist/ folder after running ng build. Seems like it would make sense to do something like:
"outputPath": "dist/",
"index": "src/index.html",
"main": "src/main.ts”,
"something": "src/something/main.ts”,
"somethingElse": "src/somethingElse/main.ts",...
I end up with an error:
Data path "" should NOT have additional properties(something)
I would like my dist/ folder to have:
main.js
something.js
somethingElse.js
Can someone help me out with this one?
答案 0 :(得分:0)
结果证明,我实际需要的是在一个工作区中创建多个应用程序。
来自angular-cli Wiki:
ng generate application my-other-app
新的应用程序将在内部生成
projects/my-other-app
现在,我们可以通过使用以下命令传递项目名称来为这两个应用程序提供服务,构建等:
ng serve my-other-app
参考:https://github.com/angular/angular-cli/wiki/stories-multiple-projects
希望这对某人遇到问题会有所帮助。