forked from TypeFox/monaco-languageclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
40 lines (39 loc) · 1.37 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
/* eslint-disable header/header */
import { defineConfig } from 'vite';
import * as path from 'path';
import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin';
export default defineConfig(() => {
const config = {
build: {
target: 'esnext',
rollupOptions: {
input: {
client: path.resolve(__dirname, 'packages/examples/client.html'),
statemachineClient: path.resolve(__dirname, 'packages/examples/statemachine_client.html'),
browser: path.resolve(__dirname, 'packages/examples/browser.html'),
react: path.resolve(__dirname, 'packages/examples/react.html'),
python: path.resolve(__dirname, 'packages/examples/python.html')
}
}
},
resolve: {
// not needed here, see https://github.com/TypeFox/monaco-languageclient#vite-dev-server-troubleshooting
// dedupe: ['monaco-editor', 'vscode']
},
server: {
origin: 'http://localhost:8080',
port: 8080
},
optimizeDeps: {
esbuildOptions: {
plugins: [
importMetaUrlPlugin
]
}
},
define: {
rootDirectory: JSON.stringify(__dirname)
}
};
return config;
});