Przeglądaj źródła

skip analyze when local build

Yuki Takei 1 rok temu
rodzic
commit
c63c21d8d9

+ 1 - 1
.github/workflows/reusable-app-prod.yml

@@ -79,7 +79,7 @@ jobs:
       run: |
         turbo run build --env-mode=loose
       env:
-        ANALYZE_BUNDLE_SIZE: 1
+        ANALYZE: 1
 
     - name: Archive production files
       id: archive-prod-files

+ 1 - 1
apps/app/next.config.js

@@ -135,7 +135,7 @@ module.exports = async(phase, { defaultConfig }) => {
   }
 
   const withBundleAnalyzer = require('@next/bundle-analyzer')({
-    enabled: phase === PHASE_PRODUCTION_BUILD || process.env.ANALYZE === 'true',
+    enabled: phase === PHASE_PRODUCTION_BUILD && process.env.ANALYZE === 'true',
   });
 
   return withBundleAnalyzer(withSuperjson()(nextConfig));

+ 8 - 0
apps/app/turbo.json

@@ -15,6 +15,14 @@
     "build": {
       "dependsOn": ["^build", "styles-prebuilt"],
       "outputs": [".next/**", "!.next/cache/**", "dist/**"],
+      "inputs": [
+        "config/**",
+        "public/**",
+        "resource/**",
+        "src/**",
+        "tsconfig*.json",
+        "vite*.ts"
+      ],
       "outputLogs": "new-only"
     },