diff --git a/docs/src/en/guide/essentials/development.md b/docs/src/en/guide/essentials/development.md index 5e168e47..287c0a96 100644 --- a/docs/src/en/guide/essentials/development.md +++ b/docs/src/en/guide/essentials/development.md @@ -95,7 +95,7 @@ The execution command is: `pnpm run [script]` or `npm run [script]`. // Lint code "lint": "vsh lint", // After installing dependencies, execute the stub script for all packages - "postinstall": "turbo run stub", + "postinstall": "pnpm -r run stub --if-present", // Only allow using pnpm "preinstall": "npx only-allow pnpm", // Install husky diff --git a/docs/src/guide/essentials/development.md b/docs/src/guide/essentials/development.md index 2af6a357..7e64564f 100644 --- a/docs/src/guide/essentials/development.md +++ b/docs/src/guide/essentials/development.md @@ -95,7 +95,7 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如 // lint 代码 "lint": "vsh lint", // 依赖安装完成之后,执行所有包的stub脚本 - "postinstall": "turbo run stub", + "postinstall": "pnpm -r run stub --if-present", // 只允许使用pnpm "preinstall": "npx only-allow pnpm", // husky的安装 diff --git a/package.json b/package.json index 940fbfba..9857ee72 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dev:play": "pnpm -F @vben/playground run dev", "format": "vsh lint --format", "lint": "vsh lint", - "postinstall": "turbo run stub", + "postinstall": "pnpm -r run stub --if-present", "preinstall": "npx only-allow pnpm", "prepare": "is-ci || husky", "preview": "turbo-run preview", diff --git a/scripts/turbo-run/src/run.ts b/scripts/turbo-run/src/run.ts index 6a8762fa..2e2efd8b 100644 --- a/scripts/turbo-run/src/run.ts +++ b/scripts/turbo-run/src/run.ts @@ -46,6 +46,7 @@ export async function run(options: RunOptions) { process.exit(1); } + process.env.VITE_CJS_IGNORE_WARNING = '1'; execaCommand(`pnpm --filter=${selectPkg} run ${command}`, { stdio: 'inherit', }); diff --git a/turbo.json b/turbo.json index a1d57e58..bc2fe7f6 100644 --- a/turbo.json +++ b/turbo.json @@ -30,9 +30,6 @@ "dependsOn": ["^build"], "outputs": [".nitro/**", ".output/**"] }, - "stub": { - "cache": false - }, "test:e2e": {}, "dev": { "dependsOn": [],