Custom generated filename with Angular Cli

前端 未结 6 1100
孤独总比滥情好
孤独总比滥情好 2020-12-24 02:18

With Angular-cli the builded filename is main.[hash].bundle.js when use ng build -prod Is it possible to remove the hash form this filename. So just main.

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-24 03:03

    Currently you can't do this with the cli, but you can come out of it and use standard Webpack.

    Run ng eject in your project and it will build up a proper Webpack configuration and scripts.

    You can read up on it in the Wiki on GitHub.

    https://github.com/angular/angular-cli/wiki/eject

    Once you've got the config you can do what @tallaxes suggested.

提交回复
热议问题