forked from kiritoko1029/deepsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (28 loc) · 823 Bytes
/
Copy pathvite.config.ts
File metadata and controls
30 lines (28 loc) · 823 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";
import tailwindcss from "@tailwindcss/vite";
// 直接使用 require 导入插件,避免 ESM 导入问题
import monacoEditorPlugin from "vite-plugin-monaco-editor";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
monacoEditorPlugin.default({
languageWorkers: ['editorWorkerService', 'html'],
publicPath: 'monaco-editor/min',
customDistPath: (root: string) => `${root}/public/monaco-editor/min`,
})
],
resolve: {
alias: [{ find: "@", replacement: "/src" }],
},
server: {
port: 5173,
proxy: {
'/api': 'http://localhost:3000',
},
},
});