@gct-paas/build 0.1.19 → 0.1.21

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 CHANGED
@@ -7,6 +7,18 @@
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.21] - 2026-06-23
11
+
12
+ ### Changed
13
+
14
+ - unocss 配置调整 处理@gct-paas包中unocss 开发环境watch 内存溢出
15
+
16
+ ## [0.1.20] - 2026-06-23
17
+
18
+ ### Changed
19
+
20
+ - unocss 配置调整 处理@gct-paas包中unocss 生产环境不生效问题
21
+
10
22
  ## [0.1.19] - 2026-06-18
11
23
 
12
24
  ### Added
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.defineUnoConfig = defineUnoConfig;
7
7
  var _unocss = require("unocss");
8
8
  var _util = require("../util/index.cjs");
9
+ var _constants = require("../constants/index.cjs");
9
10
  function defineUnoConfig(config) {
10
11
  return (0, _unocss.defineConfig)((0, _util.mergeConfig)({
11
12
  shortcuts: {
@@ -29,9 +30,18 @@ function defineUnoConfig(config) {
29
30
  },
30
31
  presets: [(0, _unocss.presetWind3)(), (0, _unocss.presetTypography)(), (0, _unocss.presetWebFonts)({})],
31
32
  content: {
32
- pipeline: {
33
- include: [/\.(vue|[jt]sx?|mjs)($|\?)/, "node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"]
34
- }
33
+ // 生产构建时 @gct-paas/* 为 external,不会进入 Vite pipeline
34
+ // 需通过 filesystem 从 es 产物中提取 UnoCSS 工具类
35
+ ...(process.env.NODE_ENV === _constants.PROD_MODE ? {
36
+ filesystem: ["node_modules/@gct-paas/**/es/**/*.mjs"],
37
+ pipeline: {
38
+ include: [/\.(vue|[jt]sx?|mjs)($|\?)/]
39
+ }
40
+ } : {
41
+ pipeline: {
42
+ include: [/\.(vue|[jt]sx?|mjs)($|\?)/, "node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"]
43
+ }
44
+ })
35
45
  }
36
46
  }, config));
37
47
  }
@@ -5,6 +5,7 @@ import {
5
5
  presetWind3
6
6
  } from "unocss";
7
7
  import { mergeConfig } from "../util/index.mjs";
8
+ import { PROD_MODE } from "../constants/index.mjs";
8
9
  export function defineUnoConfig(config) {
9
10
  return defineConfig(
10
11
  mergeConfig(
@@ -30,11 +31,20 @@ export function defineUnoConfig(config) {
30
31
  },
31
32
  presets: [presetWind3(), presetTypography(), presetWebFonts({})],
32
33
  content: {
33
- pipeline: {
34
- include: [
35
- /\.(vue|[jt]sx?|mjs)($|\?)/,
36
- "node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"
37
- ]
34
+ // 生产构建时 @gct-paas/* 为 external,不会进入 Vite pipeline
35
+ // 需通过 filesystem 从 es 产物中提取 UnoCSS 工具类
36
+ ...process.env.NODE_ENV === PROD_MODE ? {
37
+ filesystem: ["node_modules/@gct-paas/**/es/**/*.mjs"],
38
+ pipeline: {
39
+ include: [/\.(vue|[jt]sx?|mjs)($|\?)/]
40
+ }
41
+ } : {
42
+ pipeline: {
43
+ include: [
44
+ /\.(vue|[jt]sx?|mjs)($|\?)/,
45
+ "node_modules/@gct-paas/**/es/**/*.{mjs,js,ts,tsx,vue}"
46
+ ]
47
+ }
38
48
  }
39
49
  }
40
50
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/build",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.cjs",