@gct-paas/build 0.1.16 → 0.1.18
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/CHANGELOG.md +12 -0
- package/dist/constants/index.cjs +1 -1
- package/dist/unocss/unocss.config.cjs +6 -1
- package/dist/vite/vite-plugins/inject-importmap-plugin.cjs +12 -0
- package/es/constants/index.mjs +3 -2
- package/es/unocss/unocss.config.mjs +11 -3
- package/es/vite/vite-plugins/inject-importmap-plugin.mjs +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.18] - 2026-06-17
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- 编译主项目时,在 BUILD_PLUGIN_ENV 模式时,使用开发态 vue 包,避免 hmr 失效
|
|
15
|
+
|
|
16
|
+
## [0.1.17] - 2026-06-02
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- unocss 配置调整 处理@gct-paas包中unocss不生效问题
|
|
21
|
+
|
|
10
22
|
## [0.1.16] - 2026-05-28
|
|
11
23
|
|
|
12
24
|
### Changed
|
package/dist/constants/index.cjs
CHANGED
|
@@ -18,4 +18,4 @@ const DEFAULT_EXTERNAL = exports.DEFAULT_EXTERNAL = ["@babel/standalone", "espri
|
|
|
18
18
|
// @gct-paas 底包相关依赖
|
|
19
19
|
"@gct-paas/api", "@gct-paas/core", "@gct-paas/core-components", "@gct-paas/core-mobile", "@gct-paas/core-web", "@gct-paas/core-pad", "@gct-paas/design", "@gct-paas/design-mobile", "@gct-paas/design-web", "@gct-paas/design-pad", "@gct-paas/native", "@gct-paas/render", "@gct-paas/render-mobile", "@gct-paas/render-pad", "@gct-paas/render-web", "@gct-paas/schema", "@gct-paas/scss",
|
|
20
20
|
// @gct-paas 独立组件库
|
|
21
|
-
"@gct-paas/
|
|
21
|
+
"@gct-paas/flow", "@gct-paas/monaco-vue-editor", "@gct-paas/platform-icons", "@gct-paas/vue-pdf", "@gct-paas/vue-video-player", "@gct-paas/vxe-table"];
|
|
@@ -27,6 +27,11 @@ function defineUnoConfig(config) {
|
|
|
27
27
|
"gct-color-text-4": "text-[#5A5F6B]",
|
|
28
28
|
"gct-color-text-5": "text-[#8B8B8B]"
|
|
29
29
|
},
|
|
30
|
-
presets: [(0, _unocss.
|
|
30
|
+
presets: [(0, _unocss.presetWind3)(), (0, _unocss.presetTypography)(), (0, _unocss.presetWebFonts)({})],
|
|
31
|
+
content: {
|
|
32
|
+
pipeline: {
|
|
33
|
+
include: [/\.(vue|[jt]sx?|mjs)($|\?)/, "node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
31
36
|
}, config));
|
|
32
37
|
}
|
|
@@ -10,6 +10,9 @@ var _simpleGit = require("simple-git");
|
|
|
10
10
|
var _util = require("../../util/index.cjs");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
13
|
+
const DEV_IMPORT_MAP_REPLACE = {
|
|
14
|
+
"vue.esm-browser.prod.js": "vue.esm-browser.js"
|
|
15
|
+
};
|
|
13
16
|
function injectImportMapPlugin(options = {}) {
|
|
14
17
|
if (options.disabled === true) {
|
|
15
18
|
return void 0;
|
|
@@ -90,6 +93,15 @@ function injectImportMapPlugin(options = {}) {
|
|
|
90
93
|
parsed.imports[prefix + key] = val;
|
|
91
94
|
});
|
|
92
95
|
});
|
|
96
|
+
Object.keys(parsed.imports).forEach(key => {
|
|
97
|
+
let val = parsed.imports[key];
|
|
98
|
+
if (typeof val === "string") {
|
|
99
|
+
Object.entries(DEV_IMPORT_MAP_REPLACE).forEach(([from, to]) => {
|
|
100
|
+
val = val.replace(from, to);
|
|
101
|
+
});
|
|
102
|
+
parsed.imports[key] = val;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
93
105
|
}
|
|
94
106
|
importMapContent = JSON.stringify(parsed);
|
|
95
107
|
} catch (parseError) {
|
package/es/constants/index.mjs
CHANGED
|
@@ -57,9 +57,10 @@ export const DEFAULT_EXTERNAL = [
|
|
|
57
57
|
"@gct-paas/schema",
|
|
58
58
|
"@gct-paas/scss",
|
|
59
59
|
// @gct-paas 独立组件库
|
|
60
|
+
"@gct-paas/flow",
|
|
61
|
+
"@gct-paas/monaco-vue-editor",
|
|
60
62
|
"@gct-paas/platform-icons",
|
|
61
63
|
"@gct-paas/vue-pdf",
|
|
62
64
|
"@gct-paas/vue-video-player",
|
|
63
|
-
"@gct-paas/
|
|
64
|
-
"@gct-paas/monaco-vue-editor"
|
|
65
|
+
"@gct-paas/vxe-table"
|
|
65
66
|
];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineConfig,
|
|
3
3
|
presetTypography,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
presetWebFonts,
|
|
5
|
+
presetWind3
|
|
6
6
|
} from "unocss";
|
|
7
7
|
import { mergeConfig } from "../util/index.mjs";
|
|
8
8
|
export function defineUnoConfig(config) {
|
|
@@ -28,7 +28,15 @@ export function defineUnoConfig(config) {
|
|
|
28
28
|
"gct-color-text-4": "text-[#5A5F6B]",
|
|
29
29
|
"gct-color-text-5": "text-[#8B8B8B]"
|
|
30
30
|
},
|
|
31
|
-
presets: [
|
|
31
|
+
presets: [presetWind3(), presetTypography(), presetWebFonts({})],
|
|
32
|
+
content: {
|
|
33
|
+
pipeline: {
|
|
34
|
+
include: [
|
|
35
|
+
/\.(vue|[jt]sx?|mjs)($|\?)/,
|
|
36
|
+
"node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
32
40
|
},
|
|
33
41
|
config
|
|
34
42
|
)
|
|
@@ -3,6 +3,9 @@ import path from "node:path";
|
|
|
3
3
|
import { simpleGit } from "simple-git";
|
|
4
4
|
import { isBuildPluginEnv } from "../../util/index.mjs";
|
|
5
5
|
const DEV_IMPORT_MAP_PREFIX = ["/plugin-design/@id/", "/plugin-render-mobile/@id/", "/plugin-render-pad/@id/", "/plugin-render-web/@id/"];
|
|
6
|
+
const DEV_IMPORT_MAP_REPLACE = {
|
|
7
|
+
"vue.esm-browser.prod.js": "vue.esm-browser.js"
|
|
8
|
+
};
|
|
6
9
|
export function injectImportMapPlugin(options = {}) {
|
|
7
10
|
if (options.disabled === true) {
|
|
8
11
|
return void 0;
|
|
@@ -82,6 +85,15 @@ export function injectImportMapPlugin(options = {}) {
|
|
|
82
85
|
parsed.imports[prefix + key] = val;
|
|
83
86
|
});
|
|
84
87
|
});
|
|
88
|
+
Object.keys(parsed.imports).forEach((key) => {
|
|
89
|
+
let val = parsed.imports[key];
|
|
90
|
+
if (typeof val === "string") {
|
|
91
|
+
Object.entries(DEV_IMPORT_MAP_REPLACE).forEach(([from, to]) => {
|
|
92
|
+
val = val.replace(from, to);
|
|
93
|
+
});
|
|
94
|
+
parsed.imports[key] = val;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
85
97
|
}
|
|
86
98
|
importMapContent = JSON.stringify(parsed);
|
|
87
99
|
} catch (parseError) {
|