Question
I need to exclude multiple files from webpack optimization from splitchunk plugin.
What I've tried
const excludedFiles = ['file 1', 'file 2'];
module.exports = {
//...
optimization: {
splitChunks: {
chunks (chunk) {
// exclude `my-excluded-chunk`
return !excludedFiles.includes(chunk.name);
}
}
}
};
Result
It seems the files are not excluded.
How can achieve that?