Skip to content

Commit

Permalink
fix: check if nextConfig.webpack is present
Browse files Browse the repository at this point in the history
  • Loading branch information
DuCanhGH committed Nov 30, 2022
1 parent bf86184 commit 53d3955
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ const withPWAInit = (
);
}
}

if (typeof nextConfig.webpack === "function") {
return nextConfig.webpack(config, options);
}
return config;
},
} as NextConfig),
Expand Down

0 comments on commit 53d3955

Please sign in to comment.