@bdsoft/element 1.1.17 → 1.1.19
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/index.js +5 -5
- package/package.json +9 -2
- package/vite.config.js +8 -32
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as ElementPlus from 'element-plus'
|
|
2
|
-
// import * as dayjsModule from 'dayjs';
|
|
3
|
-
// const dayjs = dayjsModule.default || dayjsModule;
|
|
1
|
+
// import * as ElementPlus from 'element-plus'
|
|
2
|
+
// // import * as dayjsModule from 'dayjs';
|
|
3
|
+
// // const dayjs = dayjsModule.default || dayjsModule;
|
|
4
4
|
|
|
5
|
-
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
6
|
-
window.ElementPlus = ElementPlus
|
|
5
|
+
// import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
|
6
|
+
// window.ElementPlus = ElementPlus
|
|
7
7
|
|
|
8
8
|
import './src/assets/css/element.scss'
|
|
9
9
|
import 'splitpanes/dist/splitpanes.css'
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bdsoft/element",
|
|
3
3
|
"description": "内部UI组件",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.19",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"vue": "^3.3.0"
|
|
9
|
+
},
|
|
10
|
+
"peerDependenciesMeta": {
|
|
11
|
+
"element-plus": {
|
|
12
|
+
"optional": false
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
"scripts": {
|
|
8
16
|
"dev": "vite",
|
|
9
17
|
"build": "vite build",
|
|
@@ -11,7 +19,6 @@
|
|
|
11
19
|
},
|
|
12
20
|
"dependencies": {
|
|
13
21
|
"@element-plus/icons-vue": "^2.3.2",
|
|
14
|
-
"element-plus": "2.13.1",
|
|
15
22
|
"splitpanes": "4.0.4"
|
|
16
23
|
}
|
|
17
24
|
}
|
package/vite.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from "vite";
|
|
2
|
-
import { fileURLToPath } from
|
|
3
|
-
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { resolve } from "path";
|
|
4
4
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
5
5
|
import vue from "@vitejs/plugin-vue";
|
|
6
6
|
import importToConst from "rollup-plugin-import-to-const";
|
|
@@ -11,8 +11,6 @@ export default defineConfig({
|
|
|
11
11
|
resolve: {
|
|
12
12
|
alias: {
|
|
13
13
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
14
|
-
"@utils": fileURLToPath(new URL("./src/utils", import.meta.url)),
|
|
15
|
-
global: fileURLToPath(new URL("./src/global", import.meta.url)),
|
|
16
14
|
"~": fileURLToPath(new URL("./src/assets", import.meta.url)),
|
|
17
15
|
},
|
|
18
16
|
},
|
|
@@ -21,20 +19,13 @@ export default defineConfig({
|
|
|
21
19
|
entry: "./index.js",
|
|
22
20
|
name: "@bdsoft/element",
|
|
23
21
|
fileName: "BdElement", // 输出的包文件名
|
|
24
|
-
formats: [
|
|
22
|
+
formats: ['es', 'umd','cjs'] // 这是默认值
|
|
25
23
|
},
|
|
26
|
-
|
|
24
|
+
outDir: "esaaa", // 根输出目录
|
|
27
25
|
minify: false,
|
|
28
26
|
rollupOptions: {
|
|
29
27
|
//忽略打包vue文件
|
|
30
|
-
external: [
|
|
31
|
-
"vue",
|
|
32
|
-
"element-plus",
|
|
33
|
-
"dayjs",
|
|
34
|
-
"@element-plus/icons-vue",
|
|
35
|
-
"vue/server-renderer",
|
|
36
|
-
"@vue/server-renderer",
|
|
37
|
-
], // 这里列出你想排除的外部依赖
|
|
28
|
+
external: ["vue", "element-plus", "@element-plus/icons-vue", "vue/server-renderer", "@vue/server-renderer"], // 这里列出你想排除的外部依赖
|
|
38
29
|
output: [
|
|
39
30
|
{
|
|
40
31
|
//配置打包根目录
|
|
@@ -43,32 +34,17 @@ export default defineConfig({
|
|
|
43
34
|
vue: "Vue",
|
|
44
35
|
"element-plus": "ElementPlus",
|
|
45
36
|
"@element-plus/icons-vue": "ElementPlusIconVue",
|
|
46
|
-
dayjs:'dayjs'
|
|
47
37
|
},
|
|
48
|
-
esModule: true, // 强制 ES 模块输出格式的兼容性
|
|
49
38
|
},
|
|
50
39
|
],
|
|
51
40
|
},
|
|
52
|
-
// 3. 修复 CommonJS 模块解析(针对 dayjs)
|
|
53
|
-
commonjsOptions: {
|
|
54
|
-
transformMixedEsModules: true, // 自动转换混合模块
|
|
55
|
-
include: [/node_modules\/dayjs/, /node_modules\/element-plus/]
|
|
56
|
-
},
|
|
57
|
-
// 优化依赖:提前预构建 dayjs,避免打包时解析错误
|
|
58
|
-
optimizeDeps: {
|
|
59
|
-
include: ["element-plus"],
|
|
60
|
-
esbuildOptions: {
|
|
61
|
-
define: { global: "globalThis" },
|
|
62
|
-
format: "esm", // 强制 ESM 格式,避免 UMD 冲突
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
41
|
},
|
|
66
42
|
css: {
|
|
67
43
|
preprocessorOptions: {
|
|
68
|
-
scss: {
|
|
44
|
+
scss: {
|
|
69
45
|
api: "modern-compiler",
|
|
70
|
-
silenceDeprecations: [
|
|
71
|
-
|
|
46
|
+
silenceDeprecations: ['legacy-js-api']
|
|
47
|
+
},
|
|
72
48
|
},
|
|
73
49
|
},
|
|
74
50
|
plugins: [vue(), vueJsx(), importToConst(), cssInjectedByJsPlugin()],
|