Currently, I am working on a Vue3 project created using Vue CLI 5.0.1
In my setup, there is a public folder that contains static assets necessary for serving the application. However, this folder is quite heavy, around 1GB in size. Whenever I run the npm run serve
command, the build process gets stuck at
[92%] sealing (asset processing copy-webpack-plugin)
.
To resolve this issue, I need to exclude the public/resources directory from the copy-webpack-plugin.
I attempted to make this configuration change by adding the following code snippet to my vue.config.js file:
chainWebpack: (config) => {
config.plugin("copy").tap(([options]) => {
options[0].ignore.push("resources/**");
return [options];
});
}
Unfortunately, this resulted in an error message:
ERROR TypeError: Cannot read property 'ignore' of undefined