I am trying to delete all .js files with in a folder which are generated from .ts files (from tsc) using clean-webpack-plugin
but it is not deleting specific files, it is deleting all files.
new CleanWebpackPlugin(['app'],
{
root: path.resolve('.'),
verbose: true,
dry: false,
exclude: ['**/*.ts','**/*.html']
})
How can i solve this problem
either do not generate .js from tsc just generate bundle.js from webpack
delete only .js files and not .ts/.html/.css from a given folder
I also want to delete the build folder, seems like I would have to go back to gulp for this
sorry my bad... i just had to change it like below to make it work
new CleanWebpackPlugin(['app/**/*.js', 'build/**/*.*'],
{
root: path.resolve('.'),
verbose: true,
dry: false
})
so basically use reg-ex in paths itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With