-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
31 lines (29 loc) · 1.3 KB
/
vite.config.ts
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
31
import path from "path";
import { defineConfig } from "vite";
export default defineConfig({
build: {
sourcemap: true,
target: "es2022",
minify: "terser",
rollupOptions: {
external: [/@layer-lib\/.+/, /@layer-ui\/.+/, /@layer-core\/.+/, /@layer-utils\/.+/],
treeshake: true,
},
},
resolve: {
alias: {
// lib
"@layer-lib/react-use-callback-ref": path.resolve(__dirname, "packages/lib/use-callback-ref/src"),
"@layer-lib/react-use-mounted": path.resolve(__dirname, "packages/lib/use-mounted/src"),
"@layer-lib/react-context": path.resolve(__dirname, "packages/lib/react-context/src"),
"@layer-lib/react-use-composed-ref": path.resolve(__dirname, "packages/lib/use-composed-ref/src"),
"@layer-lib/react-use-browser-layout-effect": path.resolve(__dirname, "packages/lib/use-browser-layout-effect/src"),
"@layer-lib/react-use-escape-key-down": path.resolve(__dirname, "packages/lib/use-escape-key-down/src"),
// ui
"@layer-ui/button": path.resolve(__dirname, "packages/ui/button/src"),
"@layer-ui/portal": path.resolve(__dirname, "packages/ui/portal/src"),
"@layer-ui/modal": path.resolve(__dirname, "packages/ui/modal/src"),
"@layer-ui/presence": path.resolve(__dirname, "packages/ui/presence/src"),
},
},
});