mirror of
https://github.com/morten-olsen/refocus.dev.git
synced 2026-02-08 00:46:25 +01:00
init
This commit is contained in:
28
packages/app/vite.config.ts
Normal file
28
packages/app/vite.config.ts
Normal 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',
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user