Skip to content

Commit

Permalink
Update framework chunk test regex to not select nested dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
atcastle committed Oct 9, 2019
1 parent 7f92c26 commit 889a3c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default async function getBaseWebpackConfig(
// TODO(atcastle): Analyze if other cache groups should be set to 'all' as well
chunks: 'all',
name: 'framework',
test: /[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types)[\\/]/,
test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types)[\\/]/,
priority: 40,
},
lib: {
Expand Down

0 comments on commit 889a3c8

Please sign in to comment.