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.
 
 
 
 
 
web-file-system/vite.config.ts

34 lines
831 B

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',
}
},
}
})