2022-09-19 18:04:14 +02:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import eslint from 'vite-plugin-eslint';
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
|
2022-09-14 16:48:46 +02:00
|
|
|
|
2022-09-19 18:04:14 +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
|
|
|
});
|