Skip to content

Commit

Permalink
enable esmodule optimizations for css modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Feb 28, 2024
1 parent 9408f35 commit f6c6bf2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export function getClientStyleLoader({
loader: MiniCssExtractPlugin.loader,
options: {
publicPath: `${assetPrefix}/_next/`,
esModule: false,
// Activating the mini-css-extract-plugin esmodules export
// allows webpack to optimize the module tree and to inline
// the css module class names directly into react components
esModule: true,
},
}
}

0 comments on commit f6c6bf2

Please sign in to comment.