CleanWebpackPlugin is not a constructor

CleanWebpackPlugin is not a constructor

这是之前的使用方式

const CleanWebpackPlugin = require('clean-webpack-plugin');
...
plugins: [
    new CleanWebpackPlugin(['dist'])
]

现在的使用方式

const { CleanWebpackPlugin } = require('clean-webpack-plugin');
...
plugins: [
    new CleanWebpackPlugin()
]
评论
:broken_heart: :confounded: :flushed: :frowning: :grinning: :heart: :kissing_heart: :mask: :pensive: :rage: :relaxed: :scream: :smile: :smirk: :sob: :stuck_out_tongue_closed_eyes: :stuck_out_tongue_winking_eye: :wink: