revert: 简化构建步骤,撤销app.config.js功能

This commit is contained in:
张传龙
2022-06-25 14:45:23 +08:00
parent 1fa9d4d472
commit b7ce7912a7
12 changed files with 18 additions and 68 deletions

View File

@@ -4,10 +4,10 @@ import { OUTPUT_DIR } from '../constant'
import { getEnvConfig, getRootPath } from '../utils'
export function runBuildCNAME() {
const { VITE_APP_GLOB_CNAME } = getEnvConfig()
if (!VITE_APP_GLOB_CNAME) return
const { VITE_APP_CNAME } = getEnvConfig()
if (!VITE_APP_CNAME) return
try {
writeFileSync(getRootPath(`${OUTPUT_DIR}/CNAME`), VITE_APP_GLOB_CNAME)
writeFileSync(getRootPath(`${OUTPUT_DIR}/CNAME`), VITE_APP_CNAME)
} catch (error) {
console.log(chalk.red('CNAME file failed to package:\n' + error))
}