Description
So this is a feature request for ability to copy assets from different folders of the project, e.g. node_modules
etc. Currently it doesn't seem to be supported even if you'll specify this:
angular-cli.json
"assets": [
"assets",
"../logo.png",
"../node_modules/third-party/cool.svg"
],
It's actually common use case, when you need to copy assets from third-party modules from node_modules
Below you can see additional information about cli and steps to reproduce:
OS?
Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
macOS Sierra 10.12.1
Versions.
Please run
ng --version
. If there's nothing outputted, please run in a Terminal:node --version
and paste the result here:
angular-cli: 1.0.0-beta.21
node: 7.2.1
os: darwin x64
Repro steps.
Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
To reproduce this issue just try to copy file one level up of src folder or explicitly fromnode_modules
Stack trace
- If you'll specify asset as
"assets": [
"assets",
"../node_modules/bootstrap-theme/svg/sprite-symbol.svg"
]
you won't see any stack trace, all good, but file won't be copied
- If you'll specify asset as
"assets": [
"assets",
"node_modules/bootstrap-theme/svg/sprite-symbol.svg"
]
ENOENT: no such file or directory, stat '/Users/serhiisol/Development/test-app/src/node_modules/bootstrap-theme/svg/sprite-symbol.svg'
Error: ENOENT: no such file or directory, stat #'/Users/serhiisol/Development/test-app/src/node_modules/bootstrap-theme/svg/sprite-symbol.svg'
at Object.fs.statSync (fs.js:906:18)
Mention any other details that might be useful.
What if you want to include assets from node_modules, which seems like a fairly common use case