Yuki Takei 3 лет назад
Родитель
Сommit
d932f149a0
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      packages/app/next.config.js

+ 9 - 5
packages/app/next.config.js

@@ -63,17 +63,21 @@ module.exports = async(phase, { defaultConfig }) => {
   /** @type {import('next').NextConfig} */
   /** @type {import('next').NextConfig} */
   const nextConfig = {
   const nextConfig = {
 
 
+    reactStrictMode: true,
+    poweredByHeader: false,
+    pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
+    i18n,
+
+    // for build
     eslint: {
     eslint: {
       ignoreDuringBuilds: true,
       ignoreDuringBuilds: true,
     },
     },
-    reactStrictMode: true,
     typescript: {
     typescript: {
       tsconfigPath: 'tsconfig.build.client.json',
       tsconfigPath: 'tsconfig.build.client.json',
     },
     },
-    pageExtensions: ['page.tsx', 'page.ts', 'page.jsx', 'page.js'],
-    transpilePackages: getTranspilePackages(),
-
-    i18n,
+    transpilePackages: phase !== PHASE_PRODUCTION_SERVER
+      ? getTranspilePackages()
+      : undefined,
 
 
     /** @param config {import('next').NextConfig} */
     /** @param config {import('next').NextConfig} */
     webpack(config, options) {
     webpack(config, options) {