-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
41 lines (37 loc) · 1.1 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
32
33
34
35
36
37
38
39
40
41
// AUTO-GENERATED FILE, DO NOT EDIT DIRECTLY
import react from "@vitejs/plugin-react";
import * as fs from "fs";
import * as path from "path";
import { defineConfig } from "vite";
import { fileURLToPath, URL } from "url";
const __dirname = fileURLToPath(new URL(".", import.meta.url));
// import eslintPlugin from "vite-plugin-eslint";
// https://vitejs.dev/config/
//
//
// vite.config.js
export default defineConfig((conf) => ({
base: "", // リポジトリ名に合わせて設定
plugins: [react()],
optimizeDeps: {},
build: {
sourcemap: true,
},
resolve: {
alias: conf.command === "build" ||
!fs.existsSync(path.resolve(__dirname, "../../packages/core/src"))
? {}
: ({
// Comment out the lines below to load a built version of blocknote
// or, keep as is to load live from sources with live reload working
"@blocknote/core": path.resolve(
__dirname,
"../../packages/core/src/",
),
"@blocknote/react": path.resolve(
__dirname,
"../../packages/react/src/",
),
} as any),
},
}));