Where is the webpack.config.js in angular-cli new project?

后端 未结 3 1257
小鲜肉
小鲜肉 2021-02-19 11:27

I\'m looking into webpack and also angular-cli, and even though angular-cli is supposed to use webpack, I can\'t see any webpack.config.js file when I create a new

相关标签:
3条回答
  • 2021-02-19 11:39

    I found this thread about configuring webpack in angular-cli. It seems webpack is not configureable at the moment, but they are working on it.

    0 讨论(0)
  • 2021-02-19 11:53

    It's not possible to edit webpack in angular-cli project.
    There is a workaround repo. Hope this might help. here. Or you can use a scaffolder too if you do it too often https://www.npmjs.com/package/es6-scaffolder. Just choose the angular 2 webpack scaffold from the options.

    0 讨论(0)
  • 2021-02-19 11:57

    You can use $ ng eject to generate webpack.config.js in the root folder of your project.

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