From 008474310b71b5670d1e4389305d294ea5028ab0 Mon Sep 17 00:00:00 2001 From: Aaron Shafovaloff Date: Sat, 6 Nov 2021 08:21:42 -0500 Subject: [PATCH] Ensure plugin-proposal-private-methods is loose This reduces noise in test output Test plan: - All tests pass flag=none Change-Id: I15a9552915a75b75a1de32be40dfd3d38abd4439 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277575 Tested-by: Service Cloud Jenkins Reviewed-by: Ahmad Amireh QA-Review: Aaron Shafovaloff Product-Review: Syed Hussain --- babel.config.js | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/babel.config.js b/babel.config.js index 914935ff93e..59e1819b9e1 100644 --- a/babel.config.js +++ b/babel.config.js @@ -55,24 +55,21 @@ module.exports = { // we can't just use the transformImports option of @instructure/ui-babel-preset because // @instructure/ui-media-player uses the old pattern of putting things in /components like InstUI used to do if (!USE_ES_MODULES) { - module.exports.plugins = [ - '@babel/plugin-proposal-optional-chaining', - [ - '@instructure/babel-plugin-transform-imports', - { - '(@instructure/ui-[^/]+)$': { - transform: (importName, matches) => { - if ( - !matches || - !matches[1] || - matches[1] === '@instructure/ui-test-utils' || - matches[1].startsWith('@instructure/ui-media') - ) - return - return `${matches[1]}/lib/${importName}` - } + module.exports.plugins.push([ + '@instructure/babel-plugin-transform-imports', + { + '(@instructure/ui-[^/]+)$': { + transform: (importName, matches) => { + if ( + !matches || + !matches[1] || + matches[1] === '@instructure/ui-test-utils' || + matches[1].startsWith('@instructure/ui-media') + ) + return + return `${matches[1]}/lib/${importName}` } } - ] - ] + } + ]) }