Explorar el Código

Auto merge base into main

GitHub Actions hace 10 meses
padre
commit
71101ed534
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      vite-plugins/updatePackageJson.ts

+ 3 - 0
vite-plugins/updatePackageJson.ts

@@ -7,6 +7,9 @@ const updatePackageJson = (): Plugin => {
   return {
     name: 'update-package-json',
     async buildStart() {
+      // 只在生产环境构建时执行
+      if (process.env.NODE_ENV !== 'production') return
+
       const packageJsonPath = path.resolve(process.cwd(), 'package.json')
 
       try {