-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
121 lines (119 loc) · 2.76 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import basicSsl from "@vitejs/plugin-basic-ssl";
import { Plugin as importToCDN, Options } from "vite-plugin-cdn-import";
const modules: Options["modules"] = [
{
name: "react",
var: "React",
path: `umd/react.production.min.js`,
},
{
name: "react-dom",
var: "ReactDOM",
path: `umd/react-dom.production.min.js`,
},
{
name: "react-is",
var: "ReactIs",
path: `umd/react-is.production.min.js`,
},
{
name: "@formily/reactive",
var: "Formily.Reactive",
path: "dist/formily.reactive.umd.production.js",
},
{
name: "@formily/path",
var: "Formily.Path",
path: "dist/formily.path.umd.production.js",
},
{
name: "@formily/reactive-react",
var: "Formily.ReactiveReact",
path: "dist/formily.reactive-react.umd.production.js",
},
{
name: "@formily/grid",
var: "Formily.Grid",
path: "dist/formily.grid.umd.production.js",
},
{
name: "@formily/shared",
var: "Formily.Shared",
path: "dist/formily.shared.umd.production.js",
},
{
name: "@formily/validator",
var: "Formily.Validator",
path: "dist/formily.validator.umd.production.js",
},
{
name: "@formily/core",
var: "Formily.Core",
path: "dist/formily.core.umd.production.js",
},
{
name: "@formily/json-schema",
var: "Formily.JSONSchema",
path: "dist/formily.json-schema.umd.production.js",
},
{
name: "@formily/react",
var: "Formily.React",
path: "dist/formily.react.umd.production.js",
},
{
name: "dayjs",
var: "dayjs",
path: "dayjs.min.js",
},
{
name: "@ant-design/icons",
var: "icons",
path: "dist/index.umd.min.js",
},
{
name: "antd",
var: "antd",
path: "dist/antd-with-locales.min.js",
css: "dist/reset.css",
},
{
name: "@pind/designable-shared",
var: "Designable.Shared",
path: "dist/designable.shared.umd.production.min.js",
},
{
name: "@pind/designable-core",
var: "Designable.Core",
path: "dist/designable.core.umd.production.min.js",
},
{
name: "@pind/designable-react",
var: "Designable.React",
path: "dist/designable.react.umd.production.min.js",
css: "dist/designable.react.umd.production.min.css",
},
{
name: "@formily/antd-v5",
var: "Formily.Antd",
path: "dist/formily.antd.umd.production.js",
},
{
name: "@pind/designable-react-settings-form",
var: "Designable.ReactSettingsForm",
path: "dist/designable.react-settings-form.umd.production.js",
css: "dist/designable.react-settings-form.umd.production.css",
},
];
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
basicSsl(),
importToCDN({
modules,
}),
],
});