Skip to content

Commit

Permalink
Add vite config and move index to root
Browse files Browse the repository at this point in the history
  • Loading branch information
OmniTroid committed Jan 28, 2024
1 parent 460a79c commit 6f31b48
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
File renamed without changes.
27 changes: 27 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import path from 'path';
import dotenv from 'dotenv';
import { defineConfig } from 'vite';

// this will update the process.env with environment variables in .env file
dotenv.config();

export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, 'webAO'),
},
extensions: ['.js', '.jsx', '.tsx', '.ts', '.json'],
},
server: {
open: true,
port: 8080,
static: {
directory: path.join(__dirname, 'webAO'),
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
sourcemap: true,
},
});

0 comments on commit 6f31b48

Please sign in to comment.