@ecoding/base.build 0.2.16 → 0.2.17
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/libs/output/index.js +2 -1
- package/libs/output/ssr.js +4 -0
- package/libs/z-helpers/const.js +3 -1
- package/libs/z-helpers/util.js +2 -2
- package/package.json +2 -2
package/libs/output/index.js
CHANGED
|
@@ -3,12 +3,13 @@ const { customConfig } = require("../z-helpers/config");
|
|
|
3
3
|
|
|
4
4
|
const pubPath = () => {
|
|
5
5
|
const dev = customConfig.dev || {};
|
|
6
|
+
const test = customConfig.test || {};
|
|
6
7
|
switch (process.env.NODE_ENV) {
|
|
7
8
|
case "prod":
|
|
8
9
|
case "production":
|
|
9
10
|
return customConfig.publicPath || "";
|
|
10
11
|
case "test":
|
|
11
|
-
return
|
|
12
|
+
return test.publicPath || "";
|
|
12
13
|
default:
|
|
13
14
|
return dev.publicPath || "/";
|
|
14
15
|
}
|
package/libs/output/ssr.js
CHANGED
|
@@ -3,9 +3,13 @@ const { customConfig } = require("../z-helpers/config");
|
|
|
3
3
|
|
|
4
4
|
const pubPath = () => {
|
|
5
5
|
const dev = customConfig.dev || {};
|
|
6
|
+
const test = customConfig.test || {};
|
|
6
7
|
switch (process.env.NODE_ENV) {
|
|
8
|
+
case "prod":
|
|
7
9
|
case "production":
|
|
8
10
|
return customConfig.publicPath || "";
|
|
11
|
+
case "test":
|
|
12
|
+
return test.publicPath || "";
|
|
9
13
|
default:
|
|
10
14
|
return dev.publicPath || "/";
|
|
11
15
|
}
|
package/libs/z-helpers/const.js
CHANGED
package/libs/z-helpers/util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const os = require('os');
|
|
2
|
-
const { Production, Development } = require('./const');
|
|
2
|
+
const { Production, Development, Test } = require('./const');
|
|
3
3
|
|
|
4
|
-
const isEnvProduction = process.env.NODE_ENV === Production;
|
|
4
|
+
const isEnvProduction = process.env.NODE_ENV === Production || process.env.NODE_ENV === Test;
|
|
5
5
|
const isEnvDevelopment = process.env.NODE_ENV === Development;
|
|
6
6
|
const workers = os.cpus().length - 1;
|
|
7
7
|
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP === 'true';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecoding/base.build",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.17",
|
|
4
4
|
"description": "tpl building",
|
|
5
5
|
"author": "cxc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "2d701f00f46bbe01aa04f8bc23dedc14bf3c6552",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@babel/core": "7.22.5",
|
|
20
20
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|