我需要更改哪些配置才能构建--prod'查找angular cli工作文件夹结构之外的文件

时间:2017-08-25 17:33:27

标签: angular angular-cli

我更改了角度项目的文件夹结构。在我更改文件夹结构之前,' ng build --prod'工作正常。

更改文件夹结构(并添加到tsconfig.spec.json和tsconfig.app.json的路径)后,我可以运行' ng serve'测试'并且' ng build',但我无法成功运行build --prod'。

在更改文件夹结构之前,项目是使用角度cli和新的'创建的。命令。文件夹结构如下:

before changing folder structure

更改文件夹结构后,项目如下所示:

after changing folder structure

现在,运行&build; build --prod',我收到此错误:

Ui / src / $$中的错误_ gendir / app / queues / review-queue / review-queue.component.ngfactory.ts(12,21):找不到模块' ../../。 ./../../../ CommonUi / SRC /应用程序/队列/队列-数据表/队列-datatable.component.ngfactory'

我需要更改哪些配置才能构建--prod'在标准的角度cli文件夹结构之外找到ngfactory文件。

1 个答案:

答案 0 :(得分:-1)

Angular 6现在有了一个库的想法。 Angular库可以解决此问题。 Nrwl.io也可以使用他们对Angular项目的monorepo的想法来解决此问题。 https://nrwl.io/

相关问题