Skip to content

Commit

Permalink
revert: totally support es5 now
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Sep 7, 2023
1 parent 62a9551 commit ad75f74
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 70 deletions.
11 changes: 2 additions & 9 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"env": {
"targets": [
"edge >= 13",
"safari >= 10",
"chrome >= 49",
"opera >= 36",
"firefox >= 45",
"ios_saf >= 10"
]
"jsc": {
"loose": true
}
}
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
- React Native
- Taro
- Electron

| <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" /><br/>Edge | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" /><br/>iOS Safari | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /><br/>Opera |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| 13+ | 49+ | 45+ | 10+ | 10+ | 36+ |
- ios 8+

# 安装

Expand Down
5 changes: 1 addition & 4 deletions docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
- React Native
- Taro
- Electron

| <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" /><br/>Edge | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" /><br/>Chrome | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" /><br/>Firefox | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" /><br/>Safari | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari-ios/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" /><br/>iOS Safari | <img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" /><br/>Opera |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| 13+ | 49+ | 45+ | 10+ | 10+ | 36+ |
- ios 8+

# 特性

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}
},
"dependencies": {
"immer": "^10.0.2",
"immer": "^9.0.21",
"react-redux": "^8.1.2",
"redux": "^4.2.1",
"topic": "^3.0.2"
Expand All @@ -70,7 +70,7 @@
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
"@redux-devtools/extension": "^3.2.5",
"@swc/core": "1.3.71",
"@swc/core": "1.3.83",
"@testing-library/react": "^14.0.0",
"@types/node": "^20.4.9",
"@types/react": "^18.2.20",
Expand Down
106 changes: 56 additions & 50 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion src/utils/immer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { Immer } from 'immer';
import { Immer, enableES5 } from 'immer';

/**
* 支持ES5,毕竟Proxy无法polyfill。有些用户手机可以10年不换!!
* @link https://immerjs.github.io/immer/docs/installation#pick-your-immer-version
* @since immer@6.0
*/
enableES5();

export const immer = new Immer({
autoFreeze: false,
Expand Down

0 comments on commit ad75f74

Please sign in to comment.