Skip to content

Commit

Permalink
RSC: Fix babel-plugin-redwood-cell to work wiht more than one cell (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe committed Feb 12, 2024
1 parent 43cb641 commit 7ee21cd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ export default function ({ types: t }: { types: typeof types }): PluginObj {
}
},
Program: {
enter() {
// Reset variables as they're still in scope from the previous file
// babel transformed in the same process
exportNames = []
hasDefaultExport = false
},
exit(path) {
const hasQueryOrDataExport =
exportNames.includes('QUERY') || exportNames.includes('DATA')
Expand Down

0 comments on commit 7ee21cd

Please sign in to comment.