@pubinfo/vite 2.0.0-beta.6 → 2.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -1
- package/package.json +5 -6
- package/dist/index.cjs +0 -415
- package/dist/index.d.cts +0 -28
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -317,7 +317,10 @@ function createDefaultAppConfig(config) {
|
|
|
317
317
|
chunkSizeWarningLimit: 2e3,
|
|
318
318
|
rollupOptions: {
|
|
319
319
|
output: {
|
|
320
|
-
entryFileNames: `assets/entry/[name]-[hash]-${timestamp}.js
|
|
320
|
+
entryFileNames: `assets/entry/[name]-[hash]-${timestamp}.js`,
|
|
321
|
+
manualChunks: {
|
|
322
|
+
pubinfo: ["pubinfo"]
|
|
323
|
+
}
|
|
321
324
|
}
|
|
322
325
|
}
|
|
323
326
|
},
|
package/package.json
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.8",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"
|
|
9
|
-
"require": "./dist/index.cjs"
|
|
8
|
+
"default": "./dist/index.mjs"
|
|
10
9
|
}
|
|
11
10
|
},
|
|
12
|
-
"main": "./dist/index.
|
|
11
|
+
"main": "./dist/index.mjs",
|
|
13
12
|
"module": "./dist/index.mjs",
|
|
14
13
|
"types": "./dist/index.d.ts",
|
|
15
14
|
"files": [
|
|
16
15
|
"dist"
|
|
17
16
|
],
|
|
18
17
|
"peerDependencies": {
|
|
19
|
-
"vue": "^3.5.
|
|
20
|
-
"vue-i18n": "^10.0.
|
|
18
|
+
"vue": "^3.5.13",
|
|
19
|
+
"vue-i18n": "^10.0.5"
|
|
21
20
|
},
|
|
22
21
|
"dependencies": {
|
|
23
22
|
"@pubinfo/unplugin-openapi": "^0.8.4",
|
package/dist/index.cjs
DELETED
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const vite = require('vite');
|
|
4
|
-
const node_process = require('node:process');
|
|
5
|
-
const chalk = require('chalk');
|
|
6
|
-
const consola = require('consola');
|
|
7
|
-
const node_module = require('node:module');
|
|
8
|
-
const node_path = require('node:path');
|
|
9
|
-
const vue = require('@vitejs/plugin-vue');
|
|
10
|
-
const vueJsx = require('@vitejs/plugin-vue-jsx');
|
|
11
|
-
const autoImport = require('unplugin-auto-import/vite');
|
|
12
|
-
const IconsResolver = require('unplugin-icons/resolver');
|
|
13
|
-
const resolvers = require('unplugin-vue-components/resolvers');
|
|
14
|
-
const components = require('unplugin-vue-components/vite');
|
|
15
|
-
const compression = require('vite-plugin-compression');
|
|
16
|
-
const Icons = require('unplugin-icons/vite');
|
|
17
|
-
const boxen = require('boxen');
|
|
18
|
-
const VueDevTools = require('vite-plugin-vue-devtools');
|
|
19
|
-
const vueLegacy = require('@vitejs/plugin-legacy');
|
|
20
|
-
const node_fs = require('node:fs');
|
|
21
|
-
const vitePluginFakeServer = require('vite-plugin-fake-server');
|
|
22
|
-
const OpenAPI = require('@pubinfo/unplugin-openapi/vite');
|
|
23
|
-
const Unocss = require('unocss/vite');
|
|
24
|
-
|
|
25
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
26
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
27
|
-
|
|
28
|
-
const chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
|
|
29
|
-
const consola__default = /*#__PURE__*/_interopDefaultCompat(consola);
|
|
30
|
-
const vue__default = /*#__PURE__*/_interopDefaultCompat(vue);
|
|
31
|
-
const vueJsx__default = /*#__PURE__*/_interopDefaultCompat(vueJsx);
|
|
32
|
-
const autoImport__default = /*#__PURE__*/_interopDefaultCompat(autoImport);
|
|
33
|
-
const IconsResolver__default = /*#__PURE__*/_interopDefaultCompat(IconsResolver);
|
|
34
|
-
const components__default = /*#__PURE__*/_interopDefaultCompat(components);
|
|
35
|
-
const compression__default = /*#__PURE__*/_interopDefaultCompat(compression);
|
|
36
|
-
const Icons__default = /*#__PURE__*/_interopDefaultCompat(Icons);
|
|
37
|
-
const boxen__default = /*#__PURE__*/_interopDefaultCompat(boxen);
|
|
38
|
-
const VueDevTools__default = /*#__PURE__*/_interopDefaultCompat(VueDevTools);
|
|
39
|
-
const vueLegacy__default = /*#__PURE__*/_interopDefaultCompat(vueLegacy);
|
|
40
|
-
const OpenAPI__default = /*#__PURE__*/_interopDefaultCompat(OpenAPI);
|
|
41
|
-
const Unocss__default = /*#__PURE__*/_interopDefaultCompat(Unocss);
|
|
42
|
-
|
|
43
|
-
function alias(root) {
|
|
44
|
-
const resolvePath = (name) => node_path.join(root, name);
|
|
45
|
-
const resolveDeps = (name, path) => node_path.join(node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))).resolve(name), path);
|
|
46
|
-
return {
|
|
47
|
-
"@": resolvePath("src"),
|
|
48
|
-
"#": resolvePath("types"),
|
|
49
|
-
// 提供路径别名给 @pubinfo/core 直接调用项目中的文件
|
|
50
|
-
"pubinfo:project": resolvePath("src"),
|
|
51
|
-
// 显示的列出导出的目录
|
|
52
|
-
// '.pubinfo': resolvePath('.pubinfo/'),
|
|
53
|
-
// '.pubinfo/api': resolvePath('.pubinfo/api/'),
|
|
54
|
-
// '.pubinfo/assets': resolvePath('.pubinfo/assets/'),
|
|
55
|
-
// '.pubinfo/config': resolvePath('.pubinfo/config/'),
|
|
56
|
-
// '.pubinfo/directives': resolvePath('.pubinfo/directives/'),
|
|
57
|
-
// '.pubinfo/layout': resolvePath('.pubinfo/layout/'),
|
|
58
|
-
// '.pubinfo/locales': resolvePath('.pubinfo/locales/'),
|
|
59
|
-
// '.pubinfo/router': resolvePath('.pubinfo/router/'),
|
|
60
|
-
// '.pubinfo/store': resolvePath('.pubinfo/store/'),
|
|
61
|
-
// '.pubinfo/styles': resolvePath('.pubinfo/styles/'),
|
|
62
|
-
// '.pubinfo/themes': resolvePath('.pubinfo/themes/'),
|
|
63
|
-
// '.pubinfo/types': resolvePath('.pubinfo/types/'),
|
|
64
|
-
// '.pubinfo/utils': resolvePath('.pubinfo/utils/'),
|
|
65
|
-
// '.pubinfo/vue': resolvePath('.pubinfo/vue/'),
|
|
66
|
-
// deps
|
|
67
|
-
"vue": resolveDeps("vue", "../"),
|
|
68
|
-
"vue-router": resolveDeps("vue-router", "../"),
|
|
69
|
-
"pinia": resolveDeps("pinia", "../"),
|
|
70
|
-
"unocss": resolveDeps("unocss", "../")
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function getServerProxy(env, isProxy) {
|
|
75
|
-
if (!isProxy) {
|
|
76
|
-
return {};
|
|
77
|
-
}
|
|
78
|
-
const targetPrefix = "VITE_APP_API_";
|
|
79
|
-
const proxyKey = Object.keys(env).filter((key) => key.startsWith(targetPrefix));
|
|
80
|
-
const serverProxy = {};
|
|
81
|
-
for (const envKey of proxyKey) {
|
|
82
|
-
const url = env[envKey];
|
|
83
|
-
const { pathname } = new URL(url);
|
|
84
|
-
const pk = `${pathname}/proxy`;
|
|
85
|
-
if (pk in serverProxy) {
|
|
86
|
-
consola__default.error(`The proxy key ${chalk__default.bold.redBright(envKey)} \u279C ${chalk__default.bold.yellowBright(url)} already exists`);
|
|
87
|
-
} else {
|
|
88
|
-
serverProxy[pk] = {
|
|
89
|
-
target: url,
|
|
90
|
-
changeOrigin: true,
|
|
91
|
-
rewrite: (path) => path.replace(pk, ""),
|
|
92
|
-
secure: false
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return serverProxy;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function createAutoImport() {
|
|
100
|
-
return autoImport__default({
|
|
101
|
-
imports: [
|
|
102
|
-
"vue",
|
|
103
|
-
"vue-router",
|
|
104
|
-
// 'vue-i18n',
|
|
105
|
-
"pinia",
|
|
106
|
-
{
|
|
107
|
-
pubinfo: [
|
|
108
|
-
"useAuth"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
// 解决代码混淆后出现的h和vue导入的h变量命名重复的问题
|
|
113
|
-
ignore: ["h"],
|
|
114
|
-
dts: "./types/auto-imports.d.ts",
|
|
115
|
-
dirs: [
|
|
116
|
-
"./src/composables/**/*"
|
|
117
|
-
],
|
|
118
|
-
resolvers: [
|
|
119
|
-
resolvers.AntDesignVueResolver(),
|
|
120
|
-
IconsResolver__default({
|
|
121
|
-
prefix: "i"
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function createComponents() {
|
|
128
|
-
return components__default({
|
|
129
|
-
dirs: [
|
|
130
|
-
"src/components"
|
|
131
|
-
],
|
|
132
|
-
directives: true,
|
|
133
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.tsx$/],
|
|
134
|
-
resolvers: [
|
|
135
|
-
IconsResolver__default(),
|
|
136
|
-
resolvers.AntDesignVueResolver({
|
|
137
|
-
resolveIcons: true,
|
|
138
|
-
importStyle: false
|
|
139
|
-
}),
|
|
140
|
-
{
|
|
141
|
-
type: "component",
|
|
142
|
-
resolve(name) {
|
|
143
|
-
const components2 = [
|
|
144
|
-
"PubinfoApp",
|
|
145
|
-
"PubinfoProvider",
|
|
146
|
-
"PubinfoIcon"
|
|
147
|
-
];
|
|
148
|
-
if (components2.includes(name)) {
|
|
149
|
-
return { name, from: "pubinfo" };
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
dts: "./types/components.d.ts"
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function createCompression(env) {
|
|
159
|
-
const { VITE_BUILD_COMPRESS } = env;
|
|
160
|
-
const compressList = VITE_BUILD_COMPRESS?.split(",") ?? [];
|
|
161
|
-
const plugin = [];
|
|
162
|
-
if (compressList.includes("gzip")) {
|
|
163
|
-
plugin.push(
|
|
164
|
-
compression__default({
|
|
165
|
-
ext: ".gz",
|
|
166
|
-
deleteOriginFile: false
|
|
167
|
-
})
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
if (compressList.includes("brotli")) {
|
|
171
|
-
plugin.push(
|
|
172
|
-
compression__default({
|
|
173
|
-
ext: ".br",
|
|
174
|
-
algorithm: "brotliCompress",
|
|
175
|
-
deleteOriginFile: false
|
|
176
|
-
})
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
return plugin;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function createIcons() {
|
|
183
|
-
return Icons__default({
|
|
184
|
-
autoInstall: false
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
class Ctx {
|
|
189
|
-
options;
|
|
190
|
-
setOptions(options) {
|
|
191
|
-
this.options = options;
|
|
192
|
-
}
|
|
193
|
-
async createInfo() {
|
|
194
|
-
console.log(
|
|
195
|
-
boxen__default(
|
|
196
|
-
`\u6B22\u8FCE\u4F7F\u7528${chalk__default.bold.greenBright(" \u6280\u672F\u5E95\u5EA7\u7BA1\u7406\u7CFB\u7EDF ")}
|
|
197
|
-
|
|
198
|
-
${chalk__default.green("\u4F7F\u7528\u6587\u6863\u5730\u5740")} ${chalk__default.green("\u279C")} https://134.108.39.195:9090/docs`,
|
|
199
|
-
{
|
|
200
|
-
padding: 1,
|
|
201
|
-
margin: 1,
|
|
202
|
-
align: "center",
|
|
203
|
-
borderColor: "yellowBright",
|
|
204
|
-
borderStyle: "round"
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
const ctx = new Ctx();
|
|
211
|
-
function appInfo() {
|
|
212
|
-
return {
|
|
213
|
-
name: "appInfo",
|
|
214
|
-
apply: "serve",
|
|
215
|
-
enforce: "pre",
|
|
216
|
-
configResolved(configuration) {
|
|
217
|
-
const root = configuration.root;
|
|
218
|
-
ctx.setOptions({
|
|
219
|
-
root
|
|
220
|
-
});
|
|
221
|
-
},
|
|
222
|
-
async buildStart() {
|
|
223
|
-
ctx.createInfo();
|
|
224
|
-
},
|
|
225
|
-
configureServer(server) {
|
|
226
|
-
const _printUrls = server.printUrls;
|
|
227
|
-
server.printUrls = () => {
|
|
228
|
-
console.log(` ${chalk__default.green("\u279C")} ${chalk__default.bold.bgBlueBright(` PUBINFO `)}${chalk__default.bold.bgYellowBright(` \u524D\u7AEF\u57FA\u7840\u6846\u67B6 `)}`);
|
|
229
|
-
_printUrls();
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function createInspector(env) {
|
|
236
|
-
const { VITE_APP_INSPECTOR } = env;
|
|
237
|
-
if (VITE_APP_INSPECTOR && VITE_APP_INSPECTOR === "true") {
|
|
238
|
-
return VueDevTools__default();
|
|
239
|
-
} else {
|
|
240
|
-
return null;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
function createLegacy(env) {
|
|
245
|
-
if (env.VITE_BUILD_LEGACY !== "true") {
|
|
246
|
-
return false;
|
|
247
|
-
}
|
|
248
|
-
return vueLegacy__default({
|
|
249
|
-
modernPolyfills: [
|
|
250
|
-
"es.array.at",
|
|
251
|
-
"es.array.find-last"
|
|
252
|
-
],
|
|
253
|
-
additionalLegacyPolyfills: ["abort-controller/polyfill"]
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
function createMock(env, isBuild) {
|
|
258
|
-
const { VITE_BUILD_MOCK } = env;
|
|
259
|
-
if (!node_fs.existsSync(node_path.resolve(node_process.cwd(), "src/mock"))) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
return vitePluginFakeServer.vitePluginFakeServer({
|
|
263
|
-
logger: !isBuild,
|
|
264
|
-
include: "src/mock",
|
|
265
|
-
infixName: false,
|
|
266
|
-
enableProd: isBuild && VITE_BUILD_MOCK === "true"
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function createOpenAPI(options) {
|
|
271
|
-
return OpenAPI__default(options || { enabled: false });
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function createUnocss() {
|
|
275
|
-
return Unocss__default();
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
function createVitePlugins(viteEnv, isBuild = false, config) {
|
|
279
|
-
const vitePlugins = [
|
|
280
|
-
vue__default(),
|
|
281
|
-
vueJsx__default(),
|
|
282
|
-
createLegacy(viteEnv),
|
|
283
|
-
createAutoImport(),
|
|
284
|
-
createComponents(),
|
|
285
|
-
createUnocss(),
|
|
286
|
-
createIcons(),
|
|
287
|
-
createMock(viteEnv, isBuild),
|
|
288
|
-
createInspector(viteEnv),
|
|
289
|
-
createOpenAPI(config.openapi),
|
|
290
|
-
appInfo()
|
|
291
|
-
];
|
|
292
|
-
const buildPlugins = () => [
|
|
293
|
-
...createCompression(viteEnv)
|
|
294
|
-
];
|
|
295
|
-
if (isBuild) {
|
|
296
|
-
vitePlugins.push(...buildPlugins());
|
|
297
|
-
}
|
|
298
|
-
return vitePlugins.filter(Boolean);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function createDefaultAppConfig(config) {
|
|
302
|
-
return ({ mode, command }) => {
|
|
303
|
-
const root = node_process.cwd();
|
|
304
|
-
const isBuild = command === "build";
|
|
305
|
-
const timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
306
|
-
const env = vite.loadEnv(mode, root);
|
|
307
|
-
const { VITE_OPEN_PROXY, VITE_BUILD_SOURCEMAP } = env;
|
|
308
|
-
const serverProxy = getServerProxy(env, !isBuild && VITE_OPEN_PROXY === "true");
|
|
309
|
-
const applicationConfig = {
|
|
310
|
-
base: "./",
|
|
311
|
-
server: {
|
|
312
|
-
open: true,
|
|
313
|
-
host: true,
|
|
314
|
-
proxy: serverProxy,
|
|
315
|
-
warmup: {
|
|
316
|
-
clientFiles: [
|
|
317
|
-
"./index.html"
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
// To fix some dev problems
|
|
322
|
-
optimizeDeps: {
|
|
323
|
-
exclude: [
|
|
324
|
-
"pubinfo",
|
|
325
|
-
"@pubinfo/core",
|
|
326
|
-
"alova"
|
|
327
|
-
]
|
|
328
|
-
},
|
|
329
|
-
resolve: {
|
|
330
|
-
alias: alias(root)
|
|
331
|
-
},
|
|
332
|
-
build: {
|
|
333
|
-
outDir: mode === "production" ? "dist" : `dist-${mode}`,
|
|
334
|
-
sourcemap: VITE_BUILD_SOURCEMAP === "true",
|
|
335
|
-
reportCompressedSize: false,
|
|
336
|
-
chunkSizeWarningLimit: 2e3,
|
|
337
|
-
rollupOptions: {
|
|
338
|
-
output: {
|
|
339
|
-
entryFileNames: `assets/entry/[name]-[hash]-${timestamp}.js`
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
plugins: createVitePlugins(env, isBuild, config)
|
|
344
|
-
};
|
|
345
|
-
return applicationConfig;
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
function createDefaultModuleConfig(config) {
|
|
350
|
-
return ({ mode, command }) => {
|
|
351
|
-
const root = node_process.cwd();
|
|
352
|
-
const isBuild = command === "build";
|
|
353
|
-
const env = vite.loadEnv(mode, root);
|
|
354
|
-
const applicationConfig = {
|
|
355
|
-
// To fix some dev problems
|
|
356
|
-
optimizeDeps: {
|
|
357
|
-
exclude: [
|
|
358
|
-
"pubinfo",
|
|
359
|
-
"@pubinfo/core",
|
|
360
|
-
"alova"
|
|
361
|
-
]
|
|
362
|
-
},
|
|
363
|
-
resolve: {
|
|
364
|
-
alias: alias(root)
|
|
365
|
-
},
|
|
366
|
-
build: {
|
|
367
|
-
rollupOptions: {
|
|
368
|
-
external: [
|
|
369
|
-
"vue",
|
|
370
|
-
"vue-router",
|
|
371
|
-
"pinia",
|
|
372
|
-
"unocss"
|
|
373
|
-
]
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
plugins: createVitePlugins(env, isBuild, config)
|
|
377
|
-
};
|
|
378
|
-
return applicationConfig;
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function definePubinfoConfig(config) {
|
|
383
|
-
return {
|
|
384
|
-
...config,
|
|
385
|
-
vite: mergeViteConfig(createDefaultAppConfig(config), config)
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
function defineModuleConfig(config) {
|
|
389
|
-
return {
|
|
390
|
-
...config,
|
|
391
|
-
vite: mergeViteConfig(createDefaultModuleConfig(config), config)
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
function mergeViteConfig(defaultOptions, config = {}) {
|
|
395
|
-
const { vite: viteOptions = {} } = config;
|
|
396
|
-
return vite.defineConfig(({ mode, command }) => {
|
|
397
|
-
return vite.mergeConfig(
|
|
398
|
-
defaultOptions({ mode, command }),
|
|
399
|
-
typeof viteOptions === "function" ? viteOptions({ mode, command }) : viteOptions
|
|
400
|
-
);
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
exports.defineModuleConfig = defineModuleConfig;
|
|
405
|
-
exports.definePubinfoConfig = definePubinfoConfig;
|
|
406
|
-
Object.prototype.hasOwnProperty.call(vite, '__proto__') &&
|
|
407
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
408
|
-
Object.defineProperty(exports, '__proto__', {
|
|
409
|
-
enumerable: true,
|
|
410
|
-
value: vite['__proto__']
|
|
411
|
-
});
|
|
412
|
-
|
|
413
|
-
Object.keys(vite).forEach(function (k) {
|
|
414
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = vite[k];
|
|
415
|
-
});
|
package/dist/index.d.cts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as _pubinfo_unplugin_openapi from '@pubinfo/unplugin-openapi';
|
|
2
|
-
import { Options } from '@pubinfo/unplugin-openapi';
|
|
3
|
-
import { UserConfig, UserConfigFnObject } from 'vite';
|
|
4
|
-
export * from 'vite';
|
|
5
|
-
|
|
6
|
-
interface PubinfoConfig {
|
|
7
|
-
/** `vite` */
|
|
8
|
-
vite?: UserConfig | UserConfigFnObject;
|
|
9
|
-
/** `@pubinfo/unplugin-openapi` */
|
|
10
|
-
openapi?: Options;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 构建应用配置
|
|
15
|
-
*/
|
|
16
|
-
declare function definePubinfoConfig(config: PubinfoConfig): {
|
|
17
|
-
vite: UserConfigFnObject;
|
|
18
|
-
openapi?: _pubinfo_unplugin_openapi.Options;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* 构建模块配置
|
|
22
|
-
*/
|
|
23
|
-
declare function defineModuleConfig(config: PubinfoConfig): {
|
|
24
|
-
vite: UserConfigFnObject;
|
|
25
|
-
openapi?: _pubinfo_unplugin_openapi.Options;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export { defineModuleConfig, definePubinfoConfig };
|