-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.devui.ts
47 lines (45 loc) · 1.11 KB
/
vite.config.devui.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
45
46
47
import { fileURLToPath, URL } from "node:url";
import path from "path";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueSetupExtend from "vite-plugin-vue-setup-extend";
import dts from "vite-plugin-dts";
export default defineConfig({
build: {
copyPublicDir: false,
outDir: "lib/devui",
lib: {
entry: path.resolve(__dirname, "src/dformly.ts"),
name: "lib",
fileName: (format: any) => `v-formly-v3-devui.${format}.js`,
},
rollupOptions: {
external: ["vue", "vue-devui", "ajv", "mitt"],
output: {
exports: "named",
// Provide global variables to use in the UMD build
// Add external deps here
globals: {
vue: "Vue",
"vue-devui": "vue-devui",
ajv: "Ajv",
mitt: "mitt",
},
},
},
},
plugins: [
dts({
entryRoot: "src",
outputDir: "types/devui",
tsConfigFilePath: "./tsconfig.types.json",
}),
vue(),
vueSetupExtend(),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});