Webpack-dev-server not bundling even after showing bundle valid message

前端 未结 6 717
渐次进展
渐次进展 2021-02-02 08:22

I\'ve set up a basic react application with webpack but I couldn\'t get the webpack-dev-server running properly.

I\'ve installed webpack-dev-server

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-02 08:53

    webpack-dev-server serves your bundle.js from memory. It won't generate the file when you run it. So bundle.js is not present as a file in this scenario.

    If you wan't to use bundle.js, for example to optimize it's size or test your production deployment, generate it with webpack using the webpack command and serve it in production mode.

提交回复
热议问题