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

后端 未结 9 1754
醉梦人生
醉梦人生 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:20

    I also found it easy and generic enough to put my index.html file in dist/ directory and add to index.html to include my bundled webpack files. main.js seems to be default output name of our bundle if no other specified in webpack's conf file. I guess it's not good and long-term solution, but I hope it can help to understand how webpack works.

提交回复
热议问题