-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathvite.config.js
40 lines (38 loc) · 929 Bytes
/
vite.config.js
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
32
33
34
35
36
37
38
39
40
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import dts from "vite-plugin-dts";
import tsconfigPaths from "vite-tsconfig-paths";
import peerDepsExternal from "rollup-plugin-peer-deps-external";
const __dirname = dirname(fileURLToPath(import.meta.url));
export default defineConfig(() => ({
plugins: [
react(),
tsconfigPaths({
configNames: ["tsconfig.json"],
}),
dts({ tsconfigPath: "./tsconfig.build.json" }),
peerDepsExternal(),
],
server: {
port: 3000,
host: true,
},
preview: {
port: 3000,
},
build: {
lib: {
entry: {
index: resolve(__dirname, "src/lib/index.tsx"),
},
name: "Scheduler",
formats: ["es"],
},
copyPublicDir: false,
},
resolve: {
extensions: [".js", ".ts", ".tsx", ".jsx"],
},
}));