This commit is contained in:
Morten Olsen
2023-06-16 11:10:50 +02:00
commit bc0d501d98
163 changed files with 16458 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
const ASSET_URL = process.env.ASSET_URL || '';
export default defineConfig({
base: ASSET_URL ? `${ASSET_URL}/` : './',
plugins: [react()],
resolve: {
alias: {
fetch: 'isomorphic-fetch',
stream: 'stream-browserify',
path: 'path-browserify',
os: 'os-browserify',
},
},
define: {
global: 'globalThis',
},
optimizeDeps: {
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: 'globalThis',
},
},
},
});