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