Webpack configuration file found but no entry configured

前端 未结 2 743
自闭症患者
自闭症患者 2021-01-26 07:42

Im trying to organize a webpack 2 template for my personal projects with webpack-dev-server and run it with the npm commands, but i\'m getting this error:

<

相关标签:
2条回答
  • 2021-01-26 08:14

    You have to export your webpack config in webpack.config.dev.js.

    Add this line add the end of your config file.

    module.exports = config;
    
    0 讨论(0)
  • 2021-01-26 08:15

    You can use webpack as an executable program, or as a node module. In your case, you are using it as a program, so you have to export your configuation object as already mentioned

    module.exports = config;
    
    0 讨论(0)
提交回复
热议问题