Enforce the framework Chunk (#9250)

This commit is contained in:
Joe Haddad 2019-11-04 11:25:14 -05:00 committed by GitHub
parent bbf705f262
commit 8e62c9b688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -293,6 +293,9 @@ export default async function getBaseWebpackConfig(
// https://github.com/zeit/next.js/pull/9012 // https://github.com/zeit/next.js/pull/9012
test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/, test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/,
priority: 40, priority: 40,
// Don't let webpack eliminate this chunk (prevents this chunk from
// becoming a part of the commons chunk)
enforce: true,
}, },
lib: { lib: {
test(module: { size: Function; identifier: Function }): boolean { test(module: { size: Function; identifier: Function }): boolean {