From 7da3ba59810ec5df1b232244ae8d7d0744471a7d Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Fri, 9 Jun 2023 22:47:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20i18n=20not=20loading=20pro?= =?UTF-8?q?perly=20due=20to=20ES=20module=20config=20extension=20(#1029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- next.config.js | 15 +++++++++++++++ next.config.mjs | 17 ----------------- tsconfig.json | 2 +- yarn.lock | 11 ++++++++++- 5 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 next.config.js delete mode 100644 next.config.mjs diff --git a/Dockerfile b/Dockerfile index e37a254c7..ee5b0b8e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV NEXT_TELEMETRY_DISABLED 1 ENV NODE_ENV production ENV NODE_OPTIONS '--no-experimental-fetch' -COPY next.config.mjs ./ +COPY next.config.js ./ COPY public ./public COPY package.json ./package.json diff --git a/next.config.js b/next.config.js new file mode 100644 index 000000000..cd8c563ea --- /dev/null +++ b/next.config.js @@ -0,0 +1,15 @@ +const { i18n } = require('./next-i18next.config'); + +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}); + +module.exports = withBundleAnalyzer({ + images: { + domains: ['cdn.jsdelivr.net'], + }, + reactStrictMode: true, + output: 'standalone', + i18n, + transpilePackages: ['@jellyfin/sdk'], +}); diff --git a/next.config.mjs b/next.config.mjs deleted file mode 100644 index e082b4799..000000000 --- a/next.config.mjs +++ /dev/null @@ -1,17 +0,0 @@ -const { i18n } = await import('./next-i18next.config.js'); - -const { default: configreBundleAnalyser } = await import('@next/bundle-analyzer'); - -const withBundleAnalyzer = configreBundleAnalyser({ - enabled: process.env.ANALYZE === 'true', -}); - -export default withBundleAnalyzer({ - images: { - domains: ['cdn.jsdelivr.net'], - }, - reactStrictMode: true, - output: 'standalone', - i18n, - transpilePackages: ['@jellyfin/sdk'], -}); diff --git a/tsconfig.json b/tsconfig.json index df921ddfa..922f76b10 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,7 +28,7 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - "next.config.mjs", + "next.config.js", ".next/types/**/*.ts" ], "exclude": [ diff --git a/yarn.lock b/yarn.lock index eb38515e3..e84580b37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -238,7 +238,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.14.5, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.22.3 resolution: "@babel/runtime@npm:7.22.3" dependencies: @@ -247,6 +247,15 @@ __metadata: languageName: node linkType: hard +"@babel/runtime@npm:^7.20.6": + version: 7.22.5 + resolution: "@babel/runtime@npm:7.22.5" + dependencies: + regenerator-runtime: ^0.13.11 + checksum: 12a50b7de2531beef38840d17af50c55a094253697600cee255311222390c68eed704829308d4fd305e1b3dfbce113272e428e9d9d45b1730e0fede997eaceb1 + languageName: node + linkType: hard + "@babel/template@npm:^7.20.7, @babel/template@npm:^7.21.9": version: 7.21.9 resolution: "@babel/template@npm:7.21.9"