Skip to content

Commit

Permalink
Remove moment locale replace from craCompat as it's a default in Next…
Browse files Browse the repository at this point in the history
….js 12
  • Loading branch information
timneutkens committed Nov 15, 2021
1 parent 9da8d65 commit e022205
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1759,12 +1759,6 @@ export default async function getBaseWebpackConfig(
webpackConfig.module?.rules &&
webpackConfig.plugins
) {
// CRA prevents loading all locales by default
// https://github.com/facebook/create-react-app/blob/fddce8a9e21bf68f37054586deb0c8636a45f50b/packages/react-scripts/config/webpack.config.js#L721
webpackConfig.plugins.push(
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/)
)

// CRA allows importing non-webpack handled files with file-loader
// these need to be the last rule to prevent catching other items
// https://github.com/facebook/create-react-app/blob/fddce8a9e21bf68f37054586deb0c8636a45f50b/packages/react-scripts/config/webpack.config.js#L594
Expand Down

0 comments on commit e022205

Please sign in to comment.