Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Adds next-intl config and removes i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed May 22, 2024
1 parent 40119e6 commit c546571
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 60 deletions.
52 changes: 0 additions & 52 deletions frontend/next-i18next.config.js

This file was deleted.

8 changes: 1 addition & 7 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
const { i18n } = require("./next-i18next.config");

const withNextIntl = require("next-intl/plugin")("./src/i18n/server.ts");
const sassOptions = require("./scripts/sassOptions");

Expand All @@ -16,17 +16,11 @@ const appSassOptions = sassOptions(basePath);
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath,
i18n,
reactStrictMode: true,
// Output only the necessary files for a deployment, excluding irrelevant node_modules
// https://nextjs.org/docs/app/api-reference/next-config-js/output
output: "standalone",
sassOptions: appSassOptions,
transpilePackages: [
// Continue to support older browsers (ES5)
// https://github.com/i18next/i18next/issues/1948
"i18next",
],
};

module.exports = withNextIntl(nextConfig);
2 changes: 1 addition & 1 deletion frontend/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const config = {
* - _next/image (image optimization files)
* - images (static files in public/images/ directory)
*/
"/((?!api|_next/static|_next/image|images|site.webmanifest).*)",
"/((?!api|_next/static|_next/image|public|img|uswds|images|robots.txt|site.webmanifest).*)",
/**
* Fix issue where the pattern above was causing middleware
* to not run on the homepage:
Expand Down
1 change: 1 addition & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"**/*.ts",
"**/*.tsx",
"__mocks__/styleMock.js",
".storybook/**/*",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
Expand Down

0 comments on commit c546571

Please sign in to comment.