Fixed Clean path

This commit is contained in:
Richard Davey 2019-05-10 16:31:52 +01:00
parent c91ed91ce3
commit f718cb8b94

View file

@ -4,6 +4,9 @@ const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const basePath = __dirname;
const targetFolder = 'dist';
module.exports = {
mode: 'production',
@ -54,6 +57,8 @@ module.exports = {
"typeof FEATURE_SOUND": JSON.stringify(true)
}),
new CleanWebpackPlugin([ 'dist' ])
new CleanWebpackPlugin([targetFolder], {
root: basePath + '/../'
})
]
};