fix: fix webpack config

This commit is contained in:
Sarah Vaupel 2020-02-01 13:54:42 +01:00
parent 783cd7d871
commit 5393a55482

View File

@ -298,7 +298,7 @@ async function webpackConfig() {
cacheGroups: { cacheGroups: {
vendor: { vendor: {
test(module, chunk) { test(module, chunk) {
return module.context.match(/[\\/]node_modules[\\/]/); return module.context && module.context.match(/[\\/]node_modules[\\/]/);
}, },
name(module, chunks, cacheGroupKey) { name(module, chunks, cacheGroupKey) {
const moduleFileName = module.identifier().split('/').reduceRight(item => item); const moduleFileName = module.identifier().split('/').reduceRight(item => item);