Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially revert 86c9ff1 Add static template hoisting to SSR #54

Merged
merged 1 commit into from Feb 26, 2021

Conversation

nicketson
Copy link
Contributor

In 86c9ff1, state for templates and events was moved from path.scope.data to path.state. Newer versions of babel have a bug with the way that TraversalContexts are tracked and it can cause path.state to be clobbered. This issue manifests itself when other babel plugins (notably @babel/plugin-proposal-class-properties) are used that visit the same AST nodes. This pull request moves template and events state back to path.scope.data.

The issue seems to have first occurred after this babel/babel#12302
I believe this unfinished PR will fix the TraversalContext bug babel/babel#12634

@ryansolid
Copy link
Owner

ryansolid commented Feb 26, 2021

Ah.. I'd seen some weird stuff recently but didn't know where it was coming from. For some reason everything time I did module clear and full re-install things were fine. We make heavy use of state in Marko so I was really liking the convenience of the approach but I can revert for now I guess.

@ryansolid ryansolid merged commit 67e27e1 into ryansolid:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants