Skip to content

Commit

Permalink
fix: resolve firebase packages to commonjs (#6532)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar committed Oct 5, 2022
1 parent 127762d commit 4fa8e4c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion packages/testing/config/jest/web/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,29 @@ module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'uuid') {
if (OVERRIDE_EXPORTS_LIST.has(pkg.name)) {
delete pkg['exports']
delete pkg['module']
}

return pkg
},
})
}

const OVERRIDE_EXPORTS_LIST = new Set([
'@firebase/analytics',
'@firebase/app',
'@firebase/app-check',
'@firebase/auth',
'@firebase/database',
'@firebase/firestore',
'@firebase/functions',
'@firebase/installations',
'@firebase/messaging',
'@firebase/performance',
'@firebase/remote-config',
'@firebase/storage',
'@firebase/util',
'firebase',
])

0 comments on commit 4fa8e4c

Please sign in to comment.