fix: try to fix the error reported by the stub command in the window system (#4560)

pull/48/MERGE
Vben 2024-10-03 15:34:29 +08:00 committed by GitHub
parent f7016466ee
commit 13fd0ea16c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 6 deletions

View File

@ -95,7 +95,7 @@ The execution command is: `pnpm run [script]` or `npm run [script]`.
// Lint code // Lint code
"lint": "vsh lint", "lint": "vsh lint",
// After installing dependencies, execute the stub script for all packages // 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 // Only allow using pnpm
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
// Install husky // Install husky

View File

@ -95,7 +95,7 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
// lint 代码 // lint 代码
"lint": "vsh lint", "lint": "vsh lint",
// 依赖安装完成之后执行所有包的stub脚本 // 依赖安装完成之后执行所有包的stub脚本
"postinstall": "turbo run stub", "postinstall": "pnpm -r run stub --if-present",
// 只允许使用pnpm // 只允许使用pnpm
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
// husky的安装 // husky的安装

View File

@ -49,7 +49,7 @@
"dev:play": "pnpm -F @vben/playground run dev", "dev:play": "pnpm -F @vben/playground run dev",
"format": "vsh lint --format", "format": "vsh lint --format",
"lint": "vsh lint", "lint": "vsh lint",
"postinstall": "turbo run stub", "postinstall": "pnpm -r run stub --if-present",
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"prepare": "is-ci || husky", "prepare": "is-ci || husky",
"preview": "turbo-run preview", "preview": "turbo-run preview",

View File

@ -46,6 +46,7 @@ export async function run(options: RunOptions) {
process.exit(1); process.exit(1);
} }
process.env.VITE_CJS_IGNORE_WARNING = '1';
execaCommand(`pnpm --filter=${selectPkg} run ${command}`, { execaCommand(`pnpm --filter=${selectPkg} run ${command}`, {
stdio: 'inherit', stdio: 'inherit',
}); });

View File

@ -30,9 +30,6 @@
"dependsOn": ["^build"], "dependsOn": ["^build"],
"outputs": [".nitro/**", ".output/**"] "outputs": [".nitro/**", ".output/**"]
}, },
"stub": {
"cache": false
},
"test:e2e": {}, "test:e2e": {},
"dev": { "dev": {
"dependsOn": [], "dependsOn": [],