fix: windows环境无法运行 (#1535)
Co-authored-by: TomyJan <tomyjan6@gmail.com> Reviewed-on: daoyoucloud/tachybase#1535 Co-authored-by: Toby <2287769986@qq.com> Co-committed-by: Toby <2287769986@qq.com>
This commit is contained in:
parent
4feee19818
commit
f25fb09230
@ -19,7 +19,7 @@
|
||||
"scripts": {
|
||||
"build": "rimraf dist && rollup -c",
|
||||
"dev": "rollup -c --watch --watch.include 'src/**' -m inline",
|
||||
"prepare": "rimraf dist && BUILD_NO_DTS=1 rollup -c --silent",
|
||||
"prepare": "rimraf dist && cross-env BUILD_NO_DTS=1 rollup -c --silent",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -52,6 +52,7 @@
|
||||
"@types/lodash": "^4.17.5",
|
||||
"@types/node": "20.14.2",
|
||||
"@types/semver": "^7.5.8",
|
||||
"cross-env": "^7.0.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"rollup": "^4.14.1",
|
||||
"rollup-plugin-dts": "^6.1.0",
|
||||
|
@ -15,7 +15,7 @@ import {
|
||||
import { readFile, writeFile } from 'fs/promises';
|
||||
import { createRequire } from 'module';
|
||||
import { Socket } from 'net';
|
||||
import { dirname, join, resolve, sep } from 'path';
|
||||
import { dirname, join, resolve, sep, win32 } from 'path';
|
||||
|
||||
import chalk from 'chalk';
|
||||
import { config } from 'dotenv';
|
||||
@ -207,9 +207,14 @@ export function generateAppDir() {
|
||||
});
|
||||
}
|
||||
process.env.APP_PACKAGE_ROOT = appDevDir;
|
||||
} else {
|
||||
if (win32.isAbsolute(appPkgPath)) {
|
||||
// windows /c:/xxx
|
||||
process.env.APP_PACKAGE_ROOT = appPkgPath.substring(1);
|
||||
} else {
|
||||
process.env.APP_PACKAGE_ROOT = appPkgPath;
|
||||
}
|
||||
}
|
||||
buildIndexHtml();
|
||||
}
|
||||
|
||||
|
@ -440,6 +440,9 @@ importers:
|
||||
'@types/semver':
|
||||
specifier: ^7.5.8
|
||||
version: 7.5.8
|
||||
cross-env:
|
||||
specifier: ^7.0.3
|
||||
version: 7.0.3
|
||||
rimraf:
|
||||
specifier: ^5.0.5
|
||||
version: 5.0.5
|
||||
|
Loading…
Reference in New Issue
Block a user