Skip to content

Commit

Permalink
fix next 10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock authored May 21, 2021
1 parent 38cfb18 commit 9dd2bc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-plugin-preact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function withPreact(nextConfig = {}) {
// Move Preact into the framework chunk instead of duplicating in routes:
const splitChunks =
config.optimization && config.optimization.splitChunks;
if (splitChunks) {
if (splitChunks && splitChunks.cacheGroups) {
const cacheGroups = splitChunks.cacheGroups;
const test = /[\\/]node_modules[\\/](preact|preact-render-to-string|preact-context-provider)[\\/]/;
if (cacheGroups.framework) {
Expand Down

0 comments on commit 9dd2bc8

Please sign in to comment.