Answer the question
In order to leave comments, you need to log in
Why can't copy-webpack-plugin find the path?
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, './src/assets'),
to: path.resolve(__dirname, './dist/assets'),
}
],
}),
ERROR in unable to locate 'C:/Users/Admin/Desktop/vue project/webpack-start-frontend/src/assets/**/*' glob
Answer the question
In order to leave comments, you need to log in
You need to add the noErrorOnMissing: true option, which will tell the collector if the folder is empty, then skip it and don't generate an error.
{
//Copy assets
from: path.resolve(__dirname, "./src/assets"),
to: path.resolve(__dirname, "./dist/assets"),
noErrorOnMissing: true,
}
You just have an empty folder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question