@dlzn-ui/vite-config 1.70.0 → 1.72.0
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.mjs +24 -39
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import browserslist from 'browserslist';
|
|
|
15
15
|
import { browserslistToTargets } from 'lightningcss';
|
|
16
16
|
import tailwindAutoReference from 'vite-plugin-vue-tailwind-auto-reference';
|
|
17
17
|
import { TDesignResolver } from '@tdesign-vue-next/auto-import-resolver';
|
|
18
|
+
import { kebabCase } from 'lodash-es';
|
|
18
19
|
import { existsSync } from 'node:fs';
|
|
19
20
|
import { webUpdateNotice } from '@plugin-web-update-notification/vite';
|
|
20
21
|
import { visualizer } from 'rollup-plugin-visualizer';
|
|
@@ -75,6 +76,8 @@ const baseConfigFn = (options) => {
|
|
|
75
76
|
};
|
|
76
77
|
};
|
|
77
78
|
|
|
79
|
+
const optimizeDepsInclude = ["dlzn-ui/components/button", "dlzn-ui/components/card", "dlzn-ui/components/checkbox", "dlzn-ui/components/checkbox-group", "dlzn-ui/components/form", "dlzn-ui/components/icon", "dlzn-ui/components/image", "dlzn-ui/components/image-viewer", "dlzn-ui/components/input", "dlzn-ui/components/input-number", "dlzn-ui/components/link", "dlzn-ui/components/pagination", "dlzn-ui/components/popconfirm", "dlzn-ui/components/popup", "dlzn-ui/components/radio-group", "dlzn-ui/components/range-input", "dlzn-ui/components/select", "dlzn-ui/components/slider", "dlzn-ui/components/switch", "dlzn-ui/components/tab-panel", "dlzn-ui/components/tag", "dlzn-ui/components/tag-input", "dlzn-ui/components/textarea", "dlzn-ui/components/tree", "dlzn-ui/components/tree-select", "dlzn-ui/components/upload", "tdesign-vue-next/dist/tdesign.min.js", "path-browserify", "lodash-es", "pinia-plugin-persistedstate", "alova", "alova/fetch", "alova/vue", "@formkit/auto-animate", "@formkit/auto-animate/vue", "dayjs", "dayjs/plugin/customParseFormat.js", "dayjs/plugin/isSameOrBefore.js", "wordcloud", "echarts/charts", "echarts/components", "echarts/core", "echarts/renderers", "@tdesign-vue-next/chat", "vue-echarts", "dompurify", "cron-parser", "cronstrue", "cronstrue/locales/zh_CN", "quartzcron", "@bprogress/core", "element-plus", "element-plus/es/components/config-provider/style/css", "element-plus/es/locale/lang/zh-cn", "element-plus/es/components/date-picker/style/css", "element-plus/es/components/scrollbar/style/css", "color"];
|
|
80
|
+
|
|
78
81
|
const tDesignAutoImportResolve = (options) => {
|
|
79
82
|
const { isProduction, root } = options;
|
|
80
83
|
const tDesignResetComponentsSubFolderFiles = globSync("src/components/tDesignReset/*/Index.vue", {
|
|
@@ -92,9 +95,27 @@ const tDesignAutoImportResolve = (options) => {
|
|
|
92
95
|
return [
|
|
93
96
|
{
|
|
94
97
|
resolve: (name) => {
|
|
95
|
-
if ([
|
|
98
|
+
if ([
|
|
99
|
+
"TCard",
|
|
100
|
+
"TCheckbox",
|
|
101
|
+
"TIcon",
|
|
102
|
+
"TImage",
|
|
103
|
+
"TImageViewer",
|
|
104
|
+
"TInput",
|
|
105
|
+
"TInputNumber",
|
|
106
|
+
"TLink",
|
|
107
|
+
"TPopconfirm",
|
|
108
|
+
"TPopup",
|
|
109
|
+
"TRangeInput",
|
|
110
|
+
"TSlider",
|
|
111
|
+
"TSwitch",
|
|
112
|
+
"TTabPanel",
|
|
113
|
+
"TTag",
|
|
114
|
+
"TTagInput",
|
|
115
|
+
"TTextarea"
|
|
116
|
+
].includes(name)) {
|
|
96
117
|
return {
|
|
97
|
-
from:
|
|
118
|
+
from: `dlzn-ui/components/${kebabCase(name.slice(1))}`,
|
|
98
119
|
name
|
|
99
120
|
};
|
|
100
121
|
}
|
|
@@ -448,43 +469,7 @@ const index = (_env, options) => {
|
|
|
448
469
|
},
|
|
449
470
|
// envDir, // 将 env 文件里面的变量注入到 import.meta.env 里面
|
|
450
471
|
optimizeDeps: {
|
|
451
|
-
include:
|
|
452
|
-
"tdesign-vue-next/dist/tdesign.min.js",
|
|
453
|
-
"path-browserify",
|
|
454
|
-
"lodash-es",
|
|
455
|
-
"pinia-plugin-persistedstate",
|
|
456
|
-
"alova",
|
|
457
|
-
"alova/fetch",
|
|
458
|
-
"alova/vue",
|
|
459
|
-
"@iconify/vue",
|
|
460
|
-
"@formkit/auto-animate",
|
|
461
|
-
"@formkit/auto-animate/vue",
|
|
462
|
-
"dayjs",
|
|
463
|
-
"dayjs/plugin/customParseFormat.js",
|
|
464
|
-
"dayjs/plugin/isSameOrBefore.js",
|
|
465
|
-
"dayjs/plugin/timezone.js",
|
|
466
|
-
"dayjs/plugin/utc.js",
|
|
467
|
-
"wordcloud",
|
|
468
|
-
"echarts/charts",
|
|
469
|
-
"echarts/components",
|
|
470
|
-
"echarts/core",
|
|
471
|
-
"echarts/renderers",
|
|
472
|
-
"@tdesign-vue-next/chat",
|
|
473
|
-
"vue-echarts",
|
|
474
|
-
"dompurify",
|
|
475
|
-
"cron-parser",
|
|
476
|
-
"cronstrue",
|
|
477
|
-
"cronstrue/locales/zh_CN",
|
|
478
|
-
"quartzcron",
|
|
479
|
-
"@bprogress/core",
|
|
480
|
-
"element-plus",
|
|
481
|
-
"element-plus/es/components/config-provider/style/css",
|
|
482
|
-
"element-plus/es/locale/lang/zh-cn",
|
|
483
|
-
"element-plus/es/components/date-picker/style/css",
|
|
484
|
-
"element-plus/es/components/scrollbar/style/css",
|
|
485
|
-
"color",
|
|
486
|
-
"dlzn-ui"
|
|
487
|
-
]
|
|
472
|
+
include: optimizeDepsInclude
|
|
488
473
|
},
|
|
489
474
|
plugins: [
|
|
490
475
|
// envParse({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dlzn-ui/vite-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.72.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vite-plugin-imagemin": "^0.6.1",
|
|
38
38
|
"vite-plugin-vue-tailwind-auto-reference": "^2.0.2",
|
|
39
39
|
"vue-router": "^5.2.0",
|
|
40
|
-
"@dlzn-ui/node-utils": "1.
|
|
40
|
+
"@dlzn-ui/node-utils": "1.72.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"rimraf": "^6.1.3",
|