Files
zyt/admin/live-native/build.mjs
T

13 lines
789 B
JavaScript

// Build the actual admin entry/router/permission store, not a projected preview.
// Output remains in the worktree; do not run scripts/release.mjs.
import {build} from 'vite'
import path from 'node:path'
import {fileURLToPath} from 'node:url'
const here=path.dirname(fileURLToPath(import.meta.url)), root=path.dirname(here)
process.chdir(root)
await build({root,mode:'live-native',configFile:path.join(root,'vite.config.ts'),envFile:false,
define:{'import.meta.env.VITE_APP_BASE_URL':JSON.stringify('https://admin.zhenyangtang.com.cn')},
cacheDir:path.join(root,'node_modules/.zyt-live-native/cache'),
build:{outDir:path.join(root,'node_modules/.zyt-live-native/dist'),emptyOutDir:true,sourcemap:false,reportCompressedSize:false,
rollupOptions:{input:path.join(here,'index.html')}}})