'ng build' with all scripts in subfolder

前端 未结 1 852
终归单人心
终归单人心 2020-12-17 01:27

It is now possible, to get not flat structure of project with ng build, so instead of this:

index.html  
main.bundle.js  
styles.bundle.js  
...         


        
相关标签:
1条回答
  • 2020-12-17 02:18

    You cannot do that by using the ng build command alone, you can do it by using the following the commands one after the other.

    ng build --output-path="dist/scripts" --deployUrl="scripts/"
    

    and

    move "dist\scripts\index.html" "dist"
    

    The last command works considering that you are using windows (is just a copy/paste, the magic is done by the --deployUrl command).

    0 讨论(0)
提交回复
热议问题