Skip to content

Commit

Permalink
Update packages/next-yak/loaders/babel-yak-plugin.cjs
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Nicklas <[email protected]>
  • Loading branch information
rvetere and jantimon authored Feb 14, 2024
1 parent 9934e30 commit e95b3c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next-yak/loaders/babel-yak-plugin.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ module.exports = function (babel, options) {
// Initialize a state flag to track whether the import should be added
},
exit(path, state) {
// Check the flag and add the import at the end of processing
// After processing the file add imports for all injected runtime helpers
if (this.runtimeInternalHelpers.size && this.yakImportPath) {
const newImport = t.importDeclaration(
[...this.runtimeInternalHelpers].map((helper) =>
Expand Down

0 comments on commit e95b3c6

Please sign in to comment.