-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvite.shared.ts
More file actions
32 lines (30 loc) · 799 Bytes
/
vite.shared.ts
File metadata and controls
32 lines (30 loc) · 799 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
31
32
import aliases from "./build/aliases";
import { UserConfigExport } from "vite";
import path from "path";
import tsConfig from "./tsconfig.json";
const alias = Object.entries(aliases).reduce(
(acc, [key, aliasPath]) => {
acc[key] = path.resolve(aliasPath);
return acc;
},
{
common: path.resolve("./src/common"),
}
);
export const sharedViteConfig: () => UserConfigExport = () => ({
// titan-reactor is the subfolder in the black-sheep-wall public dir
resolve: {
alias,
},
optimizeDeps: {
esbuildOptions: {
target: tsConfig.compilerOptions.target,
define: {
global: "globalThis",
},
supported: {
bigint: true,
},
},
},
});