From c6f2a6026a573c07db4e892c7b4a5ad762fc4331 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Sun, 15 Mar 2020 11:37:33 +0100 Subject: [PATCH] GH-40 Disable additional polyfills (as from Next.js 9.3 they should be added when necessary) --- next.config.js | 18 +++++++++--------- polyfills.js | 11 ----------- 2 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 polyfills.js diff --git a/next.config.js b/next.config.js index c4e28f4..9e8b7f8 100644 --- a/next.config.js +++ b/next.config.js @@ -31,17 +31,17 @@ const nextConfig = { }, }); - // From the 'with-polyfills' netx.js example. - const originalEntry = config.entry; - config.entry = async () => { - const entries = await originalEntry(); + // // From the 'with-polyfills' netx.js example. + // const originalEntry = config.entry; + // config.entry = async () => { + // const entries = await originalEntry(); - if (entries['main.js'] && !entries['main.js'].includes('./polyfills.js')) { - entries['main.js'].unshift('./polyfills.js'); - } + // if (entries['main.js'] && !entries['main.js'].includes('./polyfills.js')) { + // entries['main.js'].unshift('./polyfills.js'); + // } - return entries; - }; + // return entries; + // }; return config; }, diff --git a/polyfills.js b/polyfills.js deleted file mode 100644 index 9239dab..0000000 --- a/polyfills.js +++ /dev/null @@ -1,11 +0,0 @@ -import 'core-js/fn/array/from'; -import 'core-js/fn/array/find'; -import 'core-js/fn/array/find-index'; -import 'core-js/fn/object/assign'; -import 'core-js/fn/object/entries'; -import 'core-js/fn/promise'; -import 'core-js/fn/string/starts-with'; -import 'core-js/fn/string/ends-with'; -import 'core-js/fn/symbol/for'; -import 'core-js/fn/weak-set'; -import 'core-js/fn/set';