Files
easydiffusion/ui/frontend/build_src/vite.config.ts
cmdr2 355870a750 Revert "Merge pull request #294 from cmdr2/main"
This reverts commit 1e3b4f9969, reversing
changes made to e0c0935d3a.
2022-10-07 20:07:15 +05:30

43 lines
972 B
TypeScript

import { defineConfig } from "vite";
import eslint from "vite-plugin-eslint";
import react from "@vitejs/plugin-react";
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
// TODO figure out why vs code complains about this even though it works
"@stores": path.resolve(__dirname, "./src/stores"),
// TODO - add more aliases
},
},
plugins: [
eslint(),
react(),
vanillaExtractPlugin({
// configuration
}),
],
server: {
port: 9001,
},
build: {
// make sure everythign is in the same directory
outDir: "../dist",
rollupOptions: {
output: {
// dont hash the file names
// maybe once we update the python server?
entryFileNames: `[name].js`,
chunkFileNames: `[name].js`,
assetFileNames: `[name].[ext]`,
},
},
},
});