diff --git a/build/script/build.ts b/build/script/build.ts index dcc4a3da06a302c9a07fa88dba1154d39171262f..0cab07297e6772e3e1c7cf0cfe9e82d22210a2e5 100644 --- a/build/script/build.ts +++ b/build/script/build.ts @@ -1,6 +1,6 @@ // #!/usr/bin/env node -import { sh } from 'tasksfile'; +// import { sh } from 'tasksfile'; import { argv } from 'yargs'; import { runBuildConfig } from './buildConf'; @@ -11,12 +11,12 @@ import { startGzipStyle } from '../plugin/gzip/compress'; export const runBuild = async () => { try { const argvList = argv._; - let cmd = `cross-env NODE_ENV=production vite build`; - // await run('cross-env', ['NODE_ENV=production', 'vite', 'build']); - await sh(cmd, { - async: true, - nopipe: true, - }); + // let cmd = `cross-env NODE_ENV=production vite build`; + // // await run('cross-env', ['NODE_ENV=production', 'vite', 'build']); + // await sh(cmd, { + // async: true, + // nopipe: true, + // }); // Generate configuration file if (!argvList.includes('no-conf')) { diff --git a/package.json b/package.json index ca016ffbfcaa40f009651c12d67a791810e6791d..5a4b9be138eb004df1b9c9c1c5b4ddff1561ee69 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "scripts": { "bootstrap": "yarn install", "serve": "cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite", - "build": "node ./build/jsc.ts build", + "build": "cross-env NODE_ENV=production vite build && node ./build/jsc.ts build", "build:site": "cross-env SITE=true npm run build ", "build:no-cache": "yarn clean:cache && node ./build/jsc.ts build", "report": "cross-env REPORT=true npm run build ",