Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 30640ff

Browse files
committed
build: use babel build-in polyfills
1 parent eea2514 commit 30640ff

File tree

4 files changed

+12
-40
lines changed

4 files changed

+12
-40
lines changed

.babelrc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"presets": [
3-
["next/babel"]
4-
],
2+
"presets": [["next/babel"]],
53
"env": {
64
"development": {
75
"plugins": ["inline-dotenv"]
86
},
97
"production": {
108
"presets": [
11-
["next/babel", {
12-
"preset-env": {
13-
"targets": {
14-
"ie": "10"
15-
},
16-
"debug": true
9+
[
10+
"next/babel",
11+
{
12+
"preset-env": {
13+
"useBuiltIns": "usage",
14+
"corejs": "3.1.4",
15+
"targets": "> 0.25%, not dead",
16+
"debug": false
17+
}
1718
}
18-
}]
19+
]
1920
]
2021
},
2122
"test": {

next.config.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,6 @@ const nextConfig = {
4747
)
4848
}
4949

50-
// IE 11 polyfills
51-
const originalEntry = config.entry
52-
config.entry = async () => {
53-
const entries = await originalEntry()
54-
55-
if (
56-
entries['main.js'] &&
57-
!entries['main.js'].includes('./utils/polyfills')
58-
) {
59-
entries['main.js'].unshift('./utils/polyfills')
60-
}
61-
62-
return entries
63-
}
64-
6550
return config
6651
},
6752
}

package-docker.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"chalk": "^2.4.1",
3232
"compatible-debug": "^1.0.0",
3333
"cookie-parser": "^1.4.4",
34-
"core-js": "3.0.1",
34+
"core-js": "3.1.4",
3535
"draft-js": "^0.10.5",
3636
"draft-js-linkify-plugin": "^2.0.1",
3737
"draft-js-mention-plugin": "3.1.3",

utils/polyfills/index.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)