2022-09-14 20:49:23 +02:00
|
|
|
import { defineConfig } from "vite";
|
2022-09-19 17:36:56 +02:00
|
|
|
import eslint from "vite-plugin-eslint";
|
2022-09-14 20:49:23 +02:00
|
|
|
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
|
|
|
|
2022-09-18 21:19:31 +02:00
|
|
|
import path from "path";
|
2022-09-14 16:48:46 +02:00
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-09-18 21:19:31 +02:00
|
|
|
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
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2022-09-15 16:19:09 +02:00
|
|
|
plugins: [
|
2022-09-19 16:14:50 +02:00
|
|
|
eslint(),
|
2022-09-15 16:19:09 +02:00
|
|
|
react(),
|
|
|
|
vanillaExtractPlugin({
|
|
|
|
// configuration
|
2022-09-15 19:44:08 +02:00
|
|
|
}),
|
2022-09-15 16:19:09 +02:00
|
|
|
],
|
2022-09-18 21:19:31 +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
|
|
|
});
|