简体   繁体   中英

Angular 6 CLI does not copy library's assets folder into dist folder

How to use an external javascript file in angular library? Do we need to export that in public_api file? Added an external JS file in asset folder of a custom library. But it's not showing in Dist folder once it's build.

The "assets" property of angular.json can be configured to include custom files in angular-cli webpack build. So, configure "assets" property value as an array. For example:

" assets": ["assets""],

above configuration will copy asset folder into dist folder during the angular-cli webpack build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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