File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
docs/documentation/stories Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,27 @@ The array below does the same as the default one:
3636]
3737```
3838
39- The contents of ` node_modules/some-package/images/ ` will be available in ` dist/some-package/ ` .
39+ The contents of ` node_modules/some-package/images/ ` will be available in ` dist/some-package/ ` .
40+
41+ ## Writing assets outside of ` dist/ `
42+
43+ Because of the security implications, the CLI will always refuse to read or write files outside of
44+ the project itself (scoped by ` .angular-cli.json ` ). It is however possible to write assets outside
45+ the ` dist/ ` build output folder during build.
46+
47+ Because writing files in your project isn't an expected effect of ` ng build ` , it is disabled by
48+ default on every assets. In order to allow this behaviour, you need to set ` allowOutsideOutDir `
49+ to ` true ` on your asset definition, like so:
50+
51+ ``` json
52+ "assets" : [
53+ {
54+ "glob" : " **/*" ,
55+ "input" : " ./assets/" ,
56+ "output" : " ../not-dist/some/folder/" ,
57+ "allowOutsideOutDir" : true
58+ },
59+ ]
60+ ```
61+
62+ This needs to be set for every assets you want to write outside of your build output directory.
You can’t perform that action at this time.
0 commit comments