easydiffusion/ui/frontend/build_src/vite.config.ts

31 lines
682 B
TypeScript
Raw Normal View History

2022-09-14 20:49:23 +02:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
2022-09-15 19:44:08 +02:00
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
2022-09-14 16:48:46 +02:00
// https://vitejs.dev/config/
export default defineConfig({
2022-09-15 16:19:09 +02:00
plugins: [
react(),
vanillaExtractPlugin({
// configuration
2022-09-15 19:44:08 +02:00
}),
2022-09-15 16:19:09 +02:00
],
2022-09-14 16:48:46 +02:00
server: {
port: 9001,
},
2022-09-15 19:44:08 +02:00
2022-09-14 16:48:46 +02:00
build: {
// make sure everythign is in the same directory
2022-09-14 20:49:23 +02:00
outDir: "../dist",
2022-09-14 16:48:46 +02:00
rollupOptions: {
output: {
// dont hash the file names
// maybe once we update the python server?
entryFileNames: `[name].js`,
chunkFileNames: `[name].js`,
2022-09-14 20:49:23 +02:00
assetFileNames: `[name].[ext]`,
},
},
2022-09-14 16:48:46 +02:00
},
2022-09-14 20:49:23 +02:00
});