forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
42 lines (38 loc) · 1.27 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
42
// Copyright © SixtyFPS GmbH <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
// cSpell: ignore lumino
import { defineConfig, UserConfig } from "vite";
import { resolve } from "path";
export default defineConfig(() => {
const base_config: UserConfig = {
server: {
fs: {
// Allow serving files from the project root
allow: ["../../"],
},
},
base: "./",
build: {
// We need to enable support for bigint
target: "safari14",
rollupOptions: {
input: {
index: "./index.html",
preview: "./preview.html",
},
},
},
resolve: {
alias: {
"@lsp": resolve(__dirname, "../lsp/pkg"),
"@interpreter": resolve(
__dirname,
"../../api/wasm-interpreter/pkg",
),
"~@lumino": "node_modules/@lumino/", // work around strange defaults in @lumino
path: "path-browserify", // To make path.sep available to monaco
},
},
};
return base_config as UserConfig;
});