diff --git a/packages/webpack-config/src/addons/withUnimodules.ts b/packages/webpack-config/src/addons/withUnimodules.ts index b97608a539..e2516f8863 100644 --- a/packages/webpack-config/src/addons/withUnimodules.ts +++ b/packages/webpack-config/src/addons/withUnimodules.ts @@ -187,7 +187,7 @@ export function ignoreExternalModules( } return ((ctx, req, cb) => { const relPath = path.join('node_modules', req); - return shouldIncludeModule(relPath) ? cb(null, []) : external(ctx, req, cb); + return shouldIncludeModule(relPath) ? cb() : external(ctx, req, cb); }) as ExternalsFunctionElement; });