@ecoding/base.build 0.0.14 → 0.0.16

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/README.md CHANGED
@@ -6,12 +6,12 @@
6
6
 
7
7
  ```javascript
8
8
  {
9
- mpa: boolean, // 是否是多页
10
- dll:boolean, // 是否打dll
11
- micro:"main" | "child", // 微前端主应用或子应用 默认null
12
- outputLibrary: string, // micro == child时生效
13
- publicPath: string,
14
- outputPath: string, // build bundle 目录,相对命令执行目录
9
+ mpa: boolean; // 是否是多页
10
+ dll:boolean; // 是否打dll
11
+ micro:"main" | "child"; // 微前端主应用或子应用 默认null
12
+ outputLibrary: string; // micro == child时生效,整个库向外暴露的变量名
13
+ publicPath: string; // client cdn 资源前缀
14
+ outputPath: string; // client build bundle 目录,相对命令执行目录
15
15
  externals: object;
16
16
  /* externals
17
17
  {
@@ -22,6 +22,14 @@
22
22
  dev:{
23
23
  publicPath: string; // devserver 读这个
24
24
  port: number, // devserver 端口 默认 8080
25
+ // https 支持
26
+ https: {
27
+ key: fs.readFileSync(path.join(__dirname, "./local.cxc.tech-key.pem")),
28
+ cert: fs.readFileSync(path.join(__dirname, "./local.cxc.tech.pem"))
29
+ }
30
+ },
31
+ ssr: {
32
+ outputPath: string; // ssr build bundle 目录,相对命令执行目录
25
33
  }
26
34
  }
27
35
  ```
@@ -55,7 +63,8 @@ module.exports = {
55
63
  "@babel/preset-env": "7.18.2", // babel插件集合
56
64
  "@babel/preset-react": "7.17.12", // babel 支持 react 插件
57
65
  "@babel/preset-typescript": "7.17.12", // babel 支持 typescript 插件
58
- "@ecoding/base.mock": "^0.0.2", // 自己写的mock插件
66
+ "@ecoding/base.mock": "0.*", // 自己写的mock插件
67
+ "@ecoding/base.spec": "*",
59
68
  "@svgr/webpack": "6.2.1", // webpack svg 插件
60
69
  "@typescript-eslint/eslint-plugin": "5.28.0", // eslint ts 插件
61
70
  "@typescript-eslint/parser": "5.28.0", // eslint ts 编译器
@@ -64,6 +73,7 @@ module.exports = {
64
73
  "babel-eslint": "10.1.0",
65
74
  "babel-loader": "8.2.5",
66
75
  "clean-webpack-plugin": "^4.0.0",
76
+ "concurrently": "^7.3.0", // 并行执行node 命令
67
77
  "core-js": "3.23.1",
68
78
  "cross-env": "7.0.3",
69
79
  "css-loader": "6.7.1",
@@ -78,10 +88,12 @@ module.exports = {
78
88
  "postcss-loader": "7.0.0", // css向下兼容
79
89
  "style-loader": "3.3.1", // 编译 style 内联css
80
90
  "terser-webpack-plugin": "5.3.3", // js压缩
91
+ "typescript": "4.8.3",
81
92
  "webpack": "5.73.0",
82
93
  "webpack-cli": "4.10.0",
83
94
  "webpack-dev-server": "4.9.2",
84
95
  "webpack-merge": "5.8.0",
96
+ "webpack-node-externals": "^3.0.0", // 打包ssr时用
85
97
  "webpackbar": "5.0.2"
86
98
  }
87
99
  ```
@@ -14,7 +14,7 @@ const pubPath = () => {
14
14
  const getOutput = () => {
15
15
  return Object.assign({
16
16
  // 输出文件目录(将来所有资源输出的公共目录)
17
- path: rootPath(customConfig.outputPath || "../src/ssr"),
17
+ path: rootPath((customConfig.ssr && customConfig.ssr.outputPath) || "../src/ssr"),
18
18
 
19
19
  /**
20
20
  * 所有资源引入公共路径前缀 --> 'imgs/a.jpg' --> '/imgs/a.jpg'
@@ -7,7 +7,6 @@ const getModule = require("./module/ssr");
7
7
  const { getResolve, getResolveLoader } = require("./resolve");
8
8
  const getExternals = require("./externals/ssr");
9
9
 
10
-
11
10
  /**
12
11
  *
13
12
  * @param {*} cmdOpts : build时 { WEBPACK_BUNDLE: true, WEBPACK_BUILD: true } | 本地开发dev时 { WEBPACK_SERVE: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "tpl building",
5
5
  "author": "cxc",
6
6
  "license": "MIT",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "b18b6f1081b99dc2fd768f37c250a245558dbf18"
56
+ "gitHead": "6df3d5d7a7e7e191e2dc0b65cc8a57b2da118f94"
57
57
  }