-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (28 loc) · 849 Bytes
/
vite.config.ts
File metadata and controls
30 lines (28 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
// Polyfill for Node.js 'global' object in browser environment
// Required for react-joyride and other libraries that expect Node.js globals
// This replaces all instances of 'global' with 'globalThis' at build time
global: "globalThis",
},
server: {
fs: {
// Allow using "npm link" for packages when developing, that are in different base path
strict: false,
},
},
optimizeDeps: {
// Dependencies to pre-bundle
},
build: {
outDir: "build",
sourcemap: true,
assetsInlineLimit: 0, // disable inlining assets
// When false, all CSS will be extracted into a single CSS file.
cssCodeSplit: false,
},
});