rsnext/examples/with-react-intl/next.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
456 B
JavaScript
Raw Normal View History

// @ts-check
/**
* @type {import('next').NextConfig}
**/
module.exports = {
i18n: {
locales: ["en", "fr", "de"],
defaultLocale: "en",
},
webpack(config, { dev, ...other }) {
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";
}
return config;
},
};