diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:03:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:03:59 +0100 |
| commit | 8fb5e4ef3ae925ebc6622711fb5c8c6147642cbc (patch) | |
| tree | 9e99137a7b64ea7993a8311a7162336a551be8b2 /next.config.js | |
| parent | 2bae7c43764df5678fe2fc2e68be11ae95d85a41 (diff) | |
| parent | e4d5b8151802517b2943756fc0d09ffa95e2c4e2 (diff) | |
feat(i18n): replace linguijs with formatjs
Diffstat (limited to 'next.config.js')
| -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/, |
