From 231c5e5bb9f88af667bbc0a96ac42b55eb1dbd76 Mon Sep 17 00:00:00 2001 From: David Stone Date: Mon, 10 Oct 2022 19:59:16 -0600 Subject: [PATCH 1/2] Use loose template literals to avoid bug in nft https://github.com/vercel/nft/issues/314 --- babel.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/babel.config.js b/babel.config.js index 7f194e7b..2001954d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,12 @@ module.exports = { + "plugins": [ + [ + "@babel/plugin-transform-template-literals", + { + "loose": true + } + ] + ], 'presets': [ [ '@babel/preset-env', @@ -9,4 +17,4 @@ module.exports = { }, ], ], -}; \ No newline at end of file +}; From fe05255d85bea099b8fa280a1dc4a250fabff213 Mon Sep 17 00:00:00 2001 From: David Stone Date: Tue, 11 Oct 2022 08:48:16 -0600 Subject: [PATCH 2/2] Use ignoreToPrimitiveHint instead of loose --- babel.config.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/babel.config.js b/babel.config.js index 2001954d..99de653b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,20 +1,20 @@ module.exports = { - "plugins": [ + "assumptions": { + "noDocumentAll": true, + "pureGetters": true, + "iterableIsArray": true, + "ignoreToPrimitiveHint": true + }, + "presets": [ [ - "@babel/plugin-transform-template-literals", + "@babel/preset-env", { - "loose": true - } - ] - ], - 'presets': [ - [ - '@babel/preset-env', - { - 'targets': { - 'esmodules': true, + "targets": { + "esmodules": true, }, - }, + useBuiltIns: "entry", + corejs: "3.25.1" + } ], ], };