migrated to vue wtf
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
import { defineConfig } from "vite";
|
||||
import { fileURLToPath, URL } from 'node:url';
|
||||
import { defineConfig } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import devEnv from './dev.env';
|
||||
import prodEnv from './prod.env';
|
||||
|
||||
const { DEVELOPMENT, BASE_URL } = process.env.DEV ? devEnv : prodEnv;
|
||||
|
||||
async function createConfig() {
|
||||
const { DEVELOPMENT, BASE_URL } = (await (process.env.DEV ? import("./dev.env") : import("./prod.env"))).default;
|
||||
|
||||
return defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": "/src",
|
||||
"assets": "/assets",
|
||||
}
|
||||
},
|
||||
base: BASE_URL,
|
||||
build: {
|
||||
minify: !DEVELOPMENT,
|
||||
target: DEVELOPMENT ? "modules" : "es6",
|
||||
sourcemap: DEVELOPMENT,
|
||||
},
|
||||
preview: {
|
||||
port: 3000,
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'assets': fileURLToPath(new URL('./assets', import.meta.url)),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default createConfig();
|
||||
},
|
||||
base: BASE_URL,
|
||||
build: {
|
||||
minify: !DEVELOPMENT,
|
||||
target: DEVELOPMENT ? "modules" : "es6",
|
||||
sourcemap: DEVELOPMENT,
|
||||
},
|
||||
preview: {
|
||||
port: 3000,
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user