diff --git a/webpack.conf.js b/webpack.conf.js index c74ac5c2b322..c934b09d439c 100644 --- a/webpack.conf.js +++ b/webpack.conf.js @@ -136,13 +136,13 @@ module.exports = { common_deps: { name: 'common_deps', test(module) { - return module.resource?.startsWith(nodeModules); + return module.resource && module.resource.startsWith(nodeModules); } }, core: { name: 'chunk-core', test: (module) => { - return module.resource?.startsWith(core); + return module.resource && module.resource.startsWith(core); } }, paapi: {