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

fix(plugin/fs-router-typegen): use swc.parseSync instead of parseFileSync #980

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Oct 20, 2024

It fails in StackBlitz as @swc/was will be used.

Copy link

vercel bot commented Oct 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Oct 21, 2024 0:08am

Copy link

codesandbox-ci bot commented Oct 20, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dai-shi
Copy link
Owner Author

dai-shi commented Oct 20, 2024

https://pkg.csb.dev/dai-shi/waku/commit/d68beda2/waku

TypeError: swc.parseFileSync is not a function

Hm, it doesn't work either.

@dai-shi
Copy link
Owner Author

dai-shi commented Oct 21, 2024

Ah, in StackBlitz, @swc/wasm is used.

@dai-shi dai-shi changed the title fix(plugin/fs-router-typegen): swc import fix(plugin/fs-router-typegen): use swc.parseSync instead of parseFileSync Oct 21, 2024
@dai-shi dai-shi marked this pull request as ready for review October 21, 2024 00:22
@dai-shi dai-shi merged commit 0685bcf into main Oct 21, 2024
24 checks passed
@dai-shi dai-shi deleted the fix/swc-import branch October 21, 2024 00:51
@dai-shi dai-shi mentioned this pull request Oct 21, 2024
@tylersayshi
Copy link
Contributor

Ah, in StackBlitz, @swc/wasm is used.

I'm confused with this. Why was this an issue?

@dai-shi
Copy link
Owner Author

dai-shi commented Oct 21, 2024

@swc/wasm doesn't export parseFileSync.
https://unpkg.com/browse/@swc/wasm@1.7.36/wasm.js

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.

2 participants