修改项目配置
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
import process from 'node:process'
|
||||
import child_process from 'node:child_process'
|
||||
import fs from 'node:fs/promises'
|
||||
|
||||
function spawn(exec: string, args: string[]) {
|
||||
child_process.spawnSync(exec, args, {
|
||||
stdio: [process.stdin, process.stdout, process.stderr]
|
||||
})
|
||||
}
|
||||
|
||||
function runBuild() {
|
||||
const args = [
|
||||
"run",
|
||||
"-A",
|
||||
"--node-modules-dir",
|
||||
]
|
||||
let i = 0
|
||||
for (const arg of process.argv) {
|
||||
if (i > 1)
|
||||
args.push(arg)
|
||||
i++
|
||||
}
|
||||
|
||||
spawn('deno', args)
|
||||
}
|
||||
|
||||
if (process.platform == 'android') {
|
||||
try {
|
||||
await fs.stat('./node_modules/.deno/rollup@4.50.1/node_modules/rollup/')
|
||||
} catch (e) {
|
||||
spawn('deno', ['install', '--node-modules-dir=auto'])
|
||||
}
|
||||
spawn('sh', ["fix-build-on-android.sh"])
|
||||
}
|
||||
|
||||
runBuild()
|
||||
@@ -1,3 +0,0 @@
|
||||
rm -r ./node_modules/.deno/rollup@4.50.1/node_modules/rollup/
|
||||
cp -r ./node_modules/.deno/@rollup+wasm-node@4.48.0/node_modules/@rollup/wasm-node/ node_modules/.deno/rollup@4.50.1/node_modules/rollup/
|
||||
echo Replaced rollup with @rollup/wasm-node successfully
|
||||
18
client/tsconfig.json
Normal file
18
client/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"DOM",
|
||||
"DOM.Iterable"
|
||||
],
|
||||
"jsx": "react-jsx",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"esModuleInterop": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user