mattpocock / xstate-codegen

A codegen tool for 100% TS type-safety in XState
MIT License
245 stars 12 forks source link

Fix babel plugin macros use in machines #55

Open danielkcz opened 3 years ago

danielkcz commented 3 years ago

I've noticed there is some attempt in code to make macros working, but no testable example so far. So I've added one and it doesn't seem to work. I have no idea what to do about it. If you can give me hint, I can try to fix it.

image

Edit: Maybe I am misunderstanding what that piece of code does, but simply adding babel-plugin-macros to the list did not solve the problem.

changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: 9d50e15325335650eb65d1adab38f1a675bbf694

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | xstate-codegen | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

danielkcz commented 3 years ago

@mattpocock This is the last piece (for now) for me to fully convert to codegen. I know I could do without macros, but that's too verbose :) I would appreciate some help, I have no idea what's happening there.

danielkcz commented 3 years ago

Hah, new year = new brain. I just added babel-plugin-macros to the mix and it solves this. It's ready for merge.