Delete unused webpack chunked files

前端 未结 7 1008
庸人自扰
庸人自扰 2021-01-03 19:03

I\'m looking for information on how to delete old webpack chunked files. Here is my current webpack configuration:

var path = require(\'path\');
var webpack          


        
7条回答
  •  爱一瞬间的悲伤
    2021-01-03 19:42

    I have solved that problem by adding below in webpack.config.js

    const { CleanWebpackPlugin } = require('clean-webpack-plugin');    
    {
      ... your configs ...
      plugins: [new CleanWebpackPlugin()]
    }
    

提交回复
热议问题