@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 +6 -0
- package/dist/unocss/unocss.config.cjs +11 -4
- package/es/unocss/unocss.config.mjs +13 -3
- package/package.json +1 -1
package/CHANGELOG.md
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
},
|