@gct-paas/build 0.1.20 → 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,12 @@
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
+
10
16
  ## [0.1.20] - 2026-06-23
11
17
 
12
18
  ### Changed
@@ -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: {
@@ -31,10 +32,16 @@ function defineUnoConfig(config) {
31
32
  content: {
32
33
  // 生产构建时 @gct-paas/* 为 external,不会进入 Vite pipeline,
33
34
  // 需通过 filesystem 从 es 产物中提取 UnoCSS 工具类
34
- filesystem: ["node_modules/@gct-paas/**/es/**/*.mjs"],
35
- pipeline: {
36
- include: [/\.(vue|[jt]sx?|mjs)($|\?)/]
37
- }
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
+ })
38
45
  }
39
46
  }, config));
40
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(
@@ -32,9 +33,18 @@ export function defineUnoConfig(config) {
32
33
  content: {
33
34
  // 生产构建时 @gct-paas/* 为 external,不会进入 Vite pipeline,
34
35
  // 需通过 filesystem 从 es 产物中提取 UnoCSS 工具类
35
- filesystem: ["node_modules/@gct-paas/**/es/**/*.mjs"],
36
- pipeline: {
37
- include: [/\.(vue|[jt]sx?|mjs)($|\?)/]
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.20",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.cjs",