Skip to content

Commit 77ecaf6

Browse files
committed
build: update build target from ES5 to ES6
1 parent dffd4e4 commit 77ecaf6

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.browserslistrc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# sync with https://github.com/mui/material-ui/blob/v5.12.1/.browserslistrc#L12-L27
2+
and_chr 91
3+
and_ff 89
4+
and_qq 10.4
5+
and_uc 12.12
6+
android 91
7+
baidu 7.12
8+
chrome 90
9+
edge 91
10+
firefox 78
11+
# 12.4 but 12.2-12.5 are treated equally in caniuse-lite.
12+
# Though caniuse-lite does not supporting finding an exact version in a range which is why `12.4` would result in "Unknown version 12.4 of ios_saf"
13+
ios_saf 12.2
14+
kaios 2.5
15+
op_mini all
16+
op_mob 76

docs/pages/migration/migration-v3.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ npm install @mui/material @emotion/react @emotion/styled
2121

2222
### Handling breaking changes
2323

24+
#### Check browser compatibility
25+
26+
This package was set to support `ES5` by default, but it's no longer the case.\
27+
Since V3, as this package is using `Material-UI`, we have adjusted the browser compatibility to match the [Material-UI's one](https://mui.com/getting-started/supported-platforms/).
28+
2429
#### Use `defineDataType` instead of `createDataType`
2530

2631
`serialize` and `deserialize` have been added to datatype to support editing feature on any data type.

rollup.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ const buildMatrix = (input: string, output: string, config: {
7979
runtime: 'automatic'
8080
}
8181
}
82+
},
83+
env: {
84+
// we have to copy this configuration because swc is not handling `.browserslistrc` properly
85+
// see https://github.com/swc-project/swc/issues/3365
86+
targets: 'and_chr 91,and_ff 89,and_qq 10.4,and_uc 12.12,android 91,baidu 7.12,chrome 90,edge 91,firefox 78,ios_saf 12.2,kaios 2.5,op_mini all,op_mob 76'
8287
}
8388
}))
8489
]

0 commit comments

Comments
 (0)