import basicSsl from '@vitejs/plugin-basic-ssl' import vue from '@vitejs/plugin-vue' import vueJsx from "@vitejs/plugin-vue-jsx"; import {resolve} from 'node:path' import {defineConfig, loadEnv} from 'vite' // https://vitejs.dev/config/ export default defineConfig(({mode, command}) => { const env = loadEnv(mode, process.cwd(), ''); return { define: { 'process.env.NODE_ENV': JSON.stringify(command === 'build' ? 'production' : 'development'), }, plugins: [ basicSsl(), vue(), vueJsx(), ], // resolve: { // alias: { // "@": fileURLToPath(new URL("./qiniu", import.meta.url)), // }, // }, build: { assetsDir: "", lib: { entry: resolve("src/frontend/index.ts"), formats: ["es"], fileName: 'wfs', } }, } })