Try removing your root: '/public',
key value and remove forward slash from ['js/']
if you really need a root
key in your settings, make sure it is an absolute path:
root: __dirname
or root: "E:/node_projects/my_project",
Plugin does work for me with these settings:
new CleanWebpackPlugin(['dist'], {
//root: '/',
verbose: true,
dry: false,
exclude: ['example.txt']
}),
My project setup:
Here is my console output:
Plugin does work for me with these settings: new CleanWebpackPlugin(['dist'], { // root: '/', verbose: true, dry: false, exclude: ['example.txt'] }),.
Sep 15, 2018 ... new CleanWebpackPlugin(pathsToClean),. The output shows that is worked logging this =>clean-webpack-plugin: {path}\dist has been removed.
Apr 10, 2021 ... A webpack plugin to remove/clean your build folder(s). ... TypeScript icon, indicating that this package has built-in type declarations.
Jun 8, 2017 ... webpack.config.js ... var CleanWebpackPlugin = require('clean-webpack-plugin'); ... new ... has been removed. clean-webpack-plugin: ...
2018年7月30日 ... npm start提示clean-webpack-plugin: /home/www/imooc/es6-webpack/dist has been removed.
Sep 3, 2020 ... A plugin for webpack that removes files and folders before and after compilation. ... that have been removed will be passed into this function.
Some Plugins and Loaders might have a beta version that has to be used in order to be compatible with webpack 5. ... Clean up configuration. Consider removing ... If you are using watch: true in webpack Node.js API, remove it. There's ... If you were using WebAssembly via import, you should follow this two step process:.
May 2, 2018 ... And it turned out that the webpack-dev-server has been in maintenance ... + new CleanWebpackPlugin('dist'), //deleted some settings from the ...
Oct 9, 2020 ... 22.5 [HPM] Proxy created: /auth,/graphql,/api -> http://localhost:8080 clean- webpack-plugin: /opt/sensu/web/build/app has been removed.
Aug 22, 2017 ... Let's start it and see what the client does: $ node server clean-webpack-plugin: C :\projects\react-from-scratch\www has been removed.