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 <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Syed Hussain <shussain@instructure.com>
This commit is contained in:
Aaron Shafovaloff 2021-11-06 08:21:42 -05:00
parent 005b2d283a
commit 008474310b
1 changed files with 15 additions and 18 deletions

View File

@ -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}`
}
}
]
]
}
])
}