How to include assets from external library into Angular CLI project
I am trying below but this does not work,
\"assets\": [
\"../node_modules/
This does now exist!
Fix #3555
To use it, update your .angular-cli.json file like so...
Angular version 2-5:
"assets": [
"assets",
{ "glob": "**/*", "input": "../node_modules/<external library>/assets/", "output": "./assets/" }
]
Angular version >= 6:
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "./node_modules/<your-node-module>/<possibly-subfolders>/",
"output": "./assets/"
},
Unfortunately, this doesn't exist yet :(. I'm desperately awaiting this feature also. Feel free to track this feature request here for Angular-Cli. Copying assets from node_modules
Updated
See @luvaas response as of Angular 6!
Since angular 6 the config has changed slightly. To achieve this now, change the assets
property of the respective builder in angular.json
(beware, there are at least two relevant builders in the architects build
and test
!)
"assets": [
"src/favicon.ico",
"src/assets",
{
"glob": "**/*",
"input": "./node_modules/<your-node-module>/<possibly-subfolders>",
"output": "./assets/<possibly-subfolders>"
},