vue-cli-plugin-electron-builder icon indicating copy to clipboard operation
vue-cli-plugin-electron-builder copied to clipboard

CleanWebpackPlugin does not work

Open LoveCodingOnGithub opened this issue 3 years ago • 2 comments

I use vue-cli-plugin-electron-builder in my project, but when I run npm run electron:build , the files still exist in the 'dist_electron' directory. So I installed the clean-webpack-plugin. But when I run the script again, it still doesn't work. Then I run npm run build and it works well. What should I do?

This is the screenshot

Snipaste_2022-06-22_11-24-33

LoveCodingOnGithub avatar Jun 22 '22 03:06 LoveCodingOnGithub

image I think the dist_electron contains some files that used in development

if you need delete some old files, you can write code to delete

klren0312 avatar Jun 22 '22 05:06 klren0312

@klren0312 Ok , got it . Thanks , maybe I need to write a plugin to delete some useless files automatically or delete these files manually .

LoveCodingOnGithub avatar Jun 22 '22 07:06 LoveCodingOnGithub

You can use clean-webpack-plugin, but you will need to configure it in vue.config.js. Or use rimraf, which you also need to configure. I suggest a preelectron:build script. But this is not related to this project. So closing this issue.

MatthijsBurgh avatar Feb 07 '23 10:02 MatthijsBurgh