@ecoding/base.build 1.0.1 → 1.0.3

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
@@ -27,10 +27,21 @@
27
27
  publicPath: string; // devserver 读这个
28
28
  port: number, // devserver 端口 默认 8080
29
29
  // https 支持
30
- https: {
31
- key: fs.readFileSync(path.join(__dirname, "./local.cxc.tech-key.pem")),
32
- cert: fs.readFileSync(path.join(__dirname, "./local.cxc.tech.pem"))
30
+ server: {
31
+ type: 'https',
32
+ // Optional: Specify custom certificates
33
+ options: {
34
+ key: fs.readFileSync(path.join(__dirname, "./local.cxc.tech-key.pem")),
35
+ cert: fs.readFileSync(path.join(__dirname, "./local.cxc.tech.pem"))
36
+ // ca: fs.readFileSync('/path/to/ca.pem'),
37
+ }
33
38
  }
39
+ proxy: [
40
+ {
41
+ context: ['/f2e/proxy'],
42
+ target:"http://test.f2e-api.sciecomm.cn",
43
+ }
44
+ ]
34
45
  },
35
46
  ssr: {
36
47
  outputPath: string; // ssr build bundle 目录,相对命令执行目录
package/libs/dev/index.js CHANGED
@@ -41,14 +41,15 @@ const getDevServer = () => {
41
41
  // secure: false
42
42
  // }
43
43
  // },
44
- onBeforeSetupMiddleware: function (devServer) {
44
+ setupMiddlewares: function (middlewares, devServer) {
45
45
  if (!devServer) {
46
46
  throw new Error("webpack-dev-server is not defined");
47
47
  }
48
48
  mock(devServer.app, {
49
49
  enable: true,
50
50
  type: "local"
51
- });
51
+ })
52
+ return middlewares
52
53
  },
53
54
  /**
54
55
  * config.devServer.proxy用来配置后端api的反向代理, ajax /api/auth/*的请求会被转发到 http://api.example.dev/auth/*, /api/pay/*的请求会被转发到 http://api.example.dev/pay/*.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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": "fd98166ae6eadaf8da812bdd88bbfd636acb3f93",
17
+ "gitHead": "fc17f614f625d1910b770d6cd3fabd2aebaca33b",
18
18
  "dependencies": {
19
19
  "@babel/core": "7.26.0",
20
20
  "@babel/plugin-proposal-decorators": "7.25.9",
@@ -38,6 +38,7 @@
38
38
  "css-minimizer-webpack-plugin": "7.0.0",
39
39
  "globby": "11.0.2",
40
40
  "html-webpack-plugin": "5.6.3",
41
+ "husky": "9.1.6",
41
42
  "inline-chunk-html-plugin": "1.1.1",
42
43
  "less": "4.2.0",
43
44
  "less-loader": "12.2.0",