Skip to content

Commit 29a77e0

Browse files
author
Jack Howard
authored
Merge pull request #5 from JackHowa/corejs-snafu
Corejs snafu
2 parents 06ed05c + e5ac8b2 commit 29a77e0

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// hopefully not used in modern
2-
31
const destructureThisArr = ['testing', 'esmodules']
42

53
// destructure

dist/app.legacy.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
<title>module/nomodule faceoff</title>
88
<meta name="description" content="Faceoff nomodule vs module" />
99
<meta name="author" content="jackhowa" />
10-
<!-- <script
11-
nomodule
12-
src="https://cdnjs.cloudflare.com/ajax/libs/core-js/3.8.2/minified.js"
13-
integrity="sha512-2cm+mPqlHOfzWZq17TAQNsGrj6GJ5Hf6fOWp3Sb6Jdol3RLQEn1wwf6a7Nq6CL4bcDQLpqBuk6u6EhktEw56Fw=="
14-
crossorigin="anonymous"
15-
></script> -->
1610
</head>
1711

1812
<body>

legacy-webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,24 @@ module.exports = {
1515
{
1616
test: /\.m?js$/,
1717
// don't transpile regenerator-runtime
18-
exclude: [/regenerator-runtime/],
18+
exclude: [/regenerator-runtime/, /core-js/],
1919
use: {
2020
loader: 'babel-loader',
2121
options: {
2222
presets: [
2323
[
2424
'@babel/preset-env',
2525
{
26+
modules: 'commonjs',
2627
targets: {
2728
edge: '14',
2829
ie: '11',
2930
firefox: '52',
3031
chrome: '43',
3132
safari: '9',
3233
},
34+
useBuiltIns: 'usage',
35+
corejs: 3
3336
},
3437
],
3538
],

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"webpack-cli": "^4.3.1"
3737
},
3838
"dependencies": {
39-
"@babel/runtime": "^7.12.5"
39+
"@babel/runtime": "^7.12.5",
40+
"core-js": "^3.8.2"
4041
}
41-
}
42+
}

0 commit comments

Comments
 (0)