林场巡检管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-cname.js 459B

2 years ago
1234567891011121314
  1. import chalk from 'chalk'
  2. import { writeFileSync } from 'fs-extra'
  3. import { OUTPUT_DIR } from '../constant'
  4. import { getEnvConfig, getRootPath } from '../utils'
  5. export function runBuildCNAME() {
  6. const { VITE_APP_GLOB_CNAME } = getEnvConfig()
  7. if (!VITE_APP_GLOB_CNAME) return
  8. try {
  9. writeFileSync(getRootPath(`${OUTPUT_DIR}/CNAME`), VITE_APP_GLOB_CNAME)
  10. } catch (error) {
  11. console.log(chalk.red('CNAME file failed to package:\n' + error))
  12. }
  13. }