Commit 30de39f31c4040413ae47980f307160789d75d69

Authored by 王强
1 parent fe464963

fix(*): 兼容低版本浏览器

Too many changes to show.

To preserve performance only 3 of 5 files are displayed.

.browserslistrc
1   -chrome >= 51
2   -edge >= 15
3   -firefox >= 54
4   -safari >= 10
5   -ios_saf >= 10
  1 +iOS >= 9
  2 +Android >= 4.4
  3 +last 2 versions
  4 +> 0.2%
  5 +not dead
... ...
modern.config.ts
1 1 import { appTools, defineConfig } from '@modern-js/app-tools';
2 2 import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss';
  3 +import { polyfillPlugin } from '@modern-js/plugin-polyfill';
3 4  
4 5 // https://modernjs.dev/en/configure/app/usage
5 6 export default defineConfig({
... ... @@ -17,6 +18,7 @@ export default defineConfig({
17 18 bundler: 'experimental-rspack',
18 19 }),
19 20 tailwindcssPlugin(),
  21 + polyfillPlugin(),
20 22 ],
21 23 performance: {
22 24 removeConsole: ['log', 'info', 'warn'],
... ... @@ -29,13 +31,9 @@ export default defineConfig({
29 31 'process.env.MODERN_CALKEY': process.env.MODERN_CALKEY,
30 32 'process.env.MODERN_XSIGN': process.env.XSIGN,
31 33 },
  34 + include: [/[\\/]node_modules[\\/]filter-obj[\\/]/, /[\\/]node_modules[\\/]query-string[\\/]/],
32 35 },
33 36 tools: {
34   - swc: {
35   - jsc: {
36   - externalHelpers: false,
37   - },
38   - },
39 37 rspack: config => {
40 38 config.experiments = {
41 39 ...config.experiments,
... ...
package.json
... ... @@ -25,25 +25,31 @@
25 25 "dist/"
26 26 ],
27 27 "dependencies": {
28   - "@feewee/h5app-common": "^0.1.61",
29   - "@modern-js/runtime": "~2.57.1",
  28 + "@ant-design/cssinjs": "^1.21.1",
  29 + "@ant-design/icons": "^5.4.0",
  30 + "@feewee/h5app-common": "^0.1.97",
  31 + "@modern-js/plugin-polyfill": "~2.55.0",
  32 + "@modern-js/runtime": "~2.55.0",
30 33 "ahooks": "^3.8.0",
31 34 "antd": "^5.20.0",
32 35 "clsx": "^2.1.1",
33 36 "dayjs": "^1.11.12",
  37 + "lodash": "^4.17.21",
  38 + "query-string": "^9.1.0",
34 39 "react": "^18.3.1",
35 40 "react-dom": "^18.3.1",
36 41 "use-immer": "^0.9.0"
37 42 },
38 43 "devDependencies": {
39 44 "@feewee/fabric": "^1.1.8",
40   - "@modern-js-app/eslint-config": "~2.57.1",
41   - "@modern-js/app-tools": "~2.57.1",
42   - "@modern-js/eslint-config": "~2.57.1",
43   - "@modern-js/plugin-tailwindcss": "~2.57.1",
44   - "@modern-js/tsconfig": "~2.57.1",
  45 + "@modern-js-app/eslint-config": "~2.55.0",
  46 + "@modern-js/app-tools": "~2.55.0",
  47 + "@modern-js/eslint-config": "~2.55.0",
  48 + "@modern-js/plugin-tailwindcss": "~2.55.0",
  49 + "@modern-js/tsconfig": "~2.55.0",
45 50 "@rsdoctor/rspack-plugin": "^0.3.11",
46 51 "@types/jest": "^29.5.12",
  52 + "@types/lodash": "^4.17.7",
47 53 "@types/node": "^18.19.43",
48 54 "@types/react": "^18.3.3",
49 55 "@types/react-dom": "^18.3.0",
... ... @@ -55,10 +61,5 @@
55 61 "rimraf": "^5.0.10",
56 62 "tailwindcss": "^3.4.7",
57 63 "typescript": "^5.5.4"
58   - },
59   - "pnpm": {
60   - "peerDependencies": {
61   - "install": true
62   - }
63 64 }
64 65 }
... ...