diff options
| -rw-r--r-- | next.config.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/next.config.js b/next.config.js index a26eda6..3583639 100644 --- a/next.config.js +++ b/next.config.js @@ -30,7 +30,12 @@ const nextConfig = { path.join(__dirname, 'node_modules'), ], }, - webpack: (config) => { + webpack: (config, { dev }) => { + if (!dev) { + // https://formatjs.io/docs/guides/advanced-usage#react-intl-without-parser-40-smaller + config.resolve.alias['@formatjs/icu-messageformat-parser'] = + '@formatjs/icu-messageformat-parser/no-parser'; + } config.module.rules.push( { test: /\.pdf/, |
