@xfe-repo/mini-app 1.6.2 → 1.6.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
@@ -1,3 +1,7 @@
1
1
  # `@xfe-repo/mini-app`
2
2
 
3
3
  mini框架基础库
4
+
5
+ H5 在启动前加载 Taro 已依赖的 `core-js/stable`,补充旧浏览器编译目标,并在生产构建中转译第三方和工作区依赖。小程序构建保持原有配置。
6
+
7
+ 这是 JS 兼容基线;具体组件样式和浏览器 Web API 仍需在目标浏览器验证。
package/babel.config.js CHANGED
@@ -2,10 +2,24 @@
2
2
  // https://docs.taro.zone/docs/next/babel-config
3
3
  module.exports = {
4
4
  presets: [
5
- ['taro', {
6
- framework: 'react',
7
- ts: true,
8
- compiler: 'webpack5',
9
- }]
10
- ]
5
+ [
6
+ 'taro',
7
+ {
8
+ framework: 'react',
9
+ ts: true,
10
+ compiler: 'webpack5',
11
+ targets:
12
+ process.env.TARO_ENV === 'h5'
13
+ ? {
14
+ edge: '18',
15
+ chrome: '64',
16
+ firefox: '60',
17
+ safari: '12',
18
+ ios: '9',
19
+ android: '5',
20
+ }
21
+ : undefined,
22
+ },
23
+ ],
24
+ ],
11
25
  }
package/config/index.ts CHANGED
@@ -117,6 +117,7 @@ export default defineConfig<'webpack5'>(async (merge) => {
117
117
  },
118
118
  webpackChain(chain) {
119
119
  chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin)
120
+ chain.entry('app').prepend(require.resolve('core-js/stable', { paths: [require.resolve('babel-preset-taro')] }))
120
121
  },
121
122
  },
122
123
  rn: {
package/config/prod.ts CHANGED
@@ -5,5 +5,10 @@ export default {
5
5
  NODE_ENV: '"production"',
6
6
  },
7
7
  mini: {},
8
- h5: {},
8
+ h5: {
9
+ compile: {
10
+ // 工作区依赖可能解析到 node_modules 外,也需要转译。
11
+ include: [(filename: string) => !/node_modules[/\\](@babel|core-js|style-loader|css-loader|react|react-dom)[/\\]/.test(filename)],
12
+ },
13
+ },
9
14
  } satisfies UserConfigExport<'webpack5'>
package/deploy/.drone.yml CHANGED
@@ -230,7 +230,7 @@ steps:
230
230
  include:
231
231
  - refs/tags/release-*
232
232
 
233
- - name: package-and-push-chart
233
+ - name: push-helm-chart
234
234
  image: xhj-prod-registry-vpc.cn-hangzhou.cr.aliyuncs.com/xhj-image-common/deploy-helm:latest
235
235
  environment:
236
236
  USERNAME:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfe-repo/mini-app",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "bin": {
5
5
  "xfe-mini": "./bin/index.js"
6
6
  },
@@ -51,8 +51,8 @@
51
51
  "typescript": "5.3.3",
52
52
  "webpack": "5.91.0",
53
53
  "yaml": "^2.3.4",
54
- "@xfe-repo/routes-define-webpack-plugin": "1.6.0",
55
- "@xfe-repo/typescript-config": "1.6.2"
54
+ "@xfe-repo/typescript-config": "1.6.2",
55
+ "@xfe-repo/routes-define-webpack-plugin": "1.6.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "react": "18.2.0",