Commit 30de39f31c4040413ae47980f307160789d75d69
1 parent
fe464963
fix(*): 兼容低版本浏览器
Showing
5 changed files
with
9234 additions
and
8781 deletions
Too many changes to show.
To preserve performance only 3 of 5 files are displayed.
.browserslistrc
modern.config.ts
1 | import { appTools, defineConfig } from '@modern-js/app-tools'; | 1 | import { appTools, defineConfig } from '@modern-js/app-tools'; |
2 | import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss'; | 2 | import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss'; |
3 | +import { polyfillPlugin } from '@modern-js/plugin-polyfill'; | ||
3 | 4 | ||
4 | // https://modernjs.dev/en/configure/app/usage | 5 | // https://modernjs.dev/en/configure/app/usage |
5 | export default defineConfig({ | 6 | export default defineConfig({ |
@@ -17,6 +18,7 @@ export default defineConfig({ | @@ -17,6 +18,7 @@ export default defineConfig({ | ||
17 | bundler: 'experimental-rspack', | 18 | bundler: 'experimental-rspack', |
18 | }), | 19 | }), |
19 | tailwindcssPlugin(), | 20 | tailwindcssPlugin(), |
21 | + polyfillPlugin(), | ||
20 | ], | 22 | ], |
21 | performance: { | 23 | performance: { |
22 | removeConsole: ['log', 'info', 'warn'], | 24 | removeConsole: ['log', 'info', 'warn'], |
@@ -29,13 +31,9 @@ export default defineConfig({ | @@ -29,13 +31,9 @@ export default defineConfig({ | ||
29 | 'process.env.MODERN_CALKEY': process.env.MODERN_CALKEY, | 31 | 'process.env.MODERN_CALKEY': process.env.MODERN_CALKEY, |
30 | 'process.env.MODERN_XSIGN': process.env.XSIGN, | 32 | 'process.env.MODERN_XSIGN': process.env.XSIGN, |
31 | }, | 33 | }, |
34 | + include: [/[\\/]node_modules[\\/]filter-obj[\\/]/, /[\\/]node_modules[\\/]query-string[\\/]/], | ||
32 | }, | 35 | }, |
33 | tools: { | 36 | tools: { |
34 | - swc: { | ||
35 | - jsc: { | ||
36 | - externalHelpers: false, | ||
37 | - }, | ||
38 | - }, | ||
39 | rspack: config => { | 37 | rspack: config => { |
40 | config.experiments = { | 38 | config.experiments = { |
41 | ...config.experiments, | 39 | ...config.experiments, |
package.json
@@ -25,25 +25,31 @@ | @@ -25,25 +25,31 @@ | ||
25 | "dist/" | 25 | "dist/" |
26 | ], | 26 | ], |
27 | "dependencies": { | 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 | "ahooks": "^3.8.0", | 33 | "ahooks": "^3.8.0", |
31 | "antd": "^5.20.0", | 34 | "antd": "^5.20.0", |
32 | "clsx": "^2.1.1", | 35 | "clsx": "^2.1.1", |
33 | "dayjs": "^1.11.12", | 36 | "dayjs": "^1.11.12", |
37 | + "lodash": "^4.17.21", | ||
38 | + "query-string": "^9.1.0", | ||
34 | "react": "^18.3.1", | 39 | "react": "^18.3.1", |
35 | "react-dom": "^18.3.1", | 40 | "react-dom": "^18.3.1", |
36 | "use-immer": "^0.9.0" | 41 | "use-immer": "^0.9.0" |
37 | }, | 42 | }, |
38 | "devDependencies": { | 43 | "devDependencies": { |
39 | "@feewee/fabric": "^1.1.8", | 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 | "@rsdoctor/rspack-plugin": "^0.3.11", | 50 | "@rsdoctor/rspack-plugin": "^0.3.11", |
46 | "@types/jest": "^29.5.12", | 51 | "@types/jest": "^29.5.12", |
52 | + "@types/lodash": "^4.17.7", | ||
47 | "@types/node": "^18.19.43", | 53 | "@types/node": "^18.19.43", |
48 | "@types/react": "^18.3.3", | 54 | "@types/react": "^18.3.3", |
49 | "@types/react-dom": "^18.3.0", | 55 | "@types/react-dom": "^18.3.0", |
@@ -55,10 +61,5 @@ | @@ -55,10 +61,5 @@ | ||
55 | "rimraf": "^5.0.10", | 61 | "rimraf": "^5.0.10", |
56 | "tailwindcss": "^3.4.7", | 62 | "tailwindcss": "^3.4.7", |
57 | "typescript": "^5.5.4" | 63 | "typescript": "^5.5.4" |
58 | - }, | ||
59 | - "pnpm": { | ||
60 | - "peerDependencies": { | ||
61 | - "install": true | ||
62 | - } | ||
63 | } | 64 | } |
64 | } | 65 | } |