-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.js
More file actions
27 lines (26 loc) · 883 Bytes
/
Copy pathvite.config.js
File metadata and controls
27 lines (26 loc) · 883 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
react: path.posix.resolve("src/react/packages/react"),
"react-dom": path.posix.resolve("src/react/packages/react-dom"),
"react-dom-bindings": path.posix.resolve(
"src/react/packages/react-dom-bindings"
),
"react-reconciler": path.posix.resolve(
"src/react/packages/react-reconciler"
),
scheduler: path.posix.resolve("src/react/packages/scheduler"),
shared: path.posix.resolve("src/react/packages/shared"),
},
},
define: {
__DEV__: false, // 设置为false跳过 if(__dev__)的开发逻辑 这样会报错 需要修改jsx_dev的引入
__EXPERIMENTAL__: true,
__PROFILE__: true,
},
});