简体   繁体   English

Angular2-cli不将共享文件夹文件复制到dist

[英]Angular2-cli not copying shared folder files to dist

Im using the Angular-cli for my angular 2 project and doing a production build using 我将Angular-cli用于我的angular 2项目,并使用

ng b -prod

the project is created using the ng-clig and as i understand all static resources like images should be placed in the shared folder 该项目是使用ng-clig创建的,据我了解,所有静态资源(如图片)都应放置在共享文件夹中

However when examining the dist folder ,it doesn't have any of the images.... 但是,当检查dist文件夹时,它没有任何图像。

Is this a known issue or i need to add something? 这是一个已知问题还是我需要添加一些内容?

You have an incorrect understanding of the shared folder. 您对shared文件夹有不正确的理解。 It is not a place to put files you wish to have copied to the build output folder. 这里不是将您希望复制的文件放入构建输出文件夹的地方。 The folder you are looking for is entitled assets those files will be copied to the output directory, dist for both dev and prod builds. 您要查找的文件夹标题为assets这些文件将被复制到输出目录,对于dev和prod生distdist

The shared directory is a place to put common (or shared) portions of your application, whether they be components, directives, pipes, classes or services. 共享目录是放置应用程序公共(或共享)部分的地方,无论它们是组件,指令,管道,类还是服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM