Webpack.config how to just copy the index.html to the dist folder

后端 未结 9 1759
醉梦人生
醉梦人生 2020-12-07 08:14

I am trying to automate assets going into /dist. I have the following config.js:

module.exports = {
  context: __dirname + "/lib",
  entry: {
    m         


        
9条回答
  •  被撕碎了的回忆
    2020-12-07 09:15

    You could use the CopyWebpackPlugin. It's working just like this:

    module.exports = {
      plugins: [
        new CopyWebpackPlugin([{
          from: './*.html'
        }])
      ]
    }
    

提交回复
热议问题