diff --git a/package.json b/package.json index ff7183b..44e202f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite --host", "build": "vite build", + "build:beta": "vite build -- -beta", "preview": "vite preview" }, "dependencies": { diff --git a/vite.config.js b/vite.config.js index a546e3e..8a0a26e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,11 +2,14 @@ import { fileURLToPath, URL } from 'node:url'; import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +console.log('process.argv :>> ', process.argv); + +const base = process.argv.includes('-beta') ? '/beta' : '/'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], - // base: '/beta', + base, resolve: { alias: { '@images': fileURLToPath(new URL('./src/assets/images',