Metronic 8 - Webpack.config - Deleting of assets
In the webpack.config there is this method below that takes care of deleting the assets but I am not sure why it is restricted by that if condition. I mean if I run 'npm run build' I expect that the dist/asstets folder will be totally deleted first and then redone so if for instance I had some images in the src/media folder that I have removed then they will also be removed from the dist/assets folder and not stay there which can cause false impressions.
To make matter worse when I ran: 'npm run localhost', that if condition still wasn't hit.
function removeExistingAssets() {
if (typeof args.localhost !== 'undefined') {
del(distPath, {force: true});
}
}
Replies (2)
Hi,
We will fix it. It should be like this.
if (typeof args.localhost === 'undefined') {
...
When running localhost, we exclude the delete function.
Thanks
Ok thanks, that makes a bit more sense in my eyes not sure why it was wrong in the first place...