-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
44 lines (41 loc) · 1.04 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
43
44
import vue from "@vitejs/plugin-vue";
import { defineConfig, loadEnv } from "vite";
import { create } from "./src/plugin";
/** @type {import('vite').UserConfig} */
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());
const base = env.VITE_APP_BASE_PATH || "/";
return {
plugins: [
vue(),
create({
selector: "observed-module",
basePath: base,
fileName: "remote-config-test-observed-module.json",
module: "observed-module",
type: "observed",
}),
create(
{
basePath: base,
pages: [".*"],
fileName: "remote-config-test-page-module.json",
module: "page-module",
type: "page",
}
),
],
build: {
rollupOptions: {
output: {
manualChunks: {
"test-main": ["./src/test-main"],
"test-file": ["./src/test-file"],
"test-file-second": ["./src/test-file-2"],
},
format: "module",
},
},
},
};
});