-
-
Notifications
You must be signed in to change notification settings - Fork 18
fix: unplugin-typegpu should parse files with TS syntax support #1516
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
base: main
Are you sure you want to change the base?
Conversation
pkg.pr.new packages
benchmark commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟦🟦🟦
Could you explain shortly in which case this change matters?
@@ -120,6 +120,7 @@ interface Options { | |||
exclude?: FilterPattern; | |||
enforce?: 'post' | 'pre' | undefined; | |||
forceTgpuAlias?: string; | |||
autoNamingEnabled?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. While we're at it, could you include the default options here as well?
This change matters when the bundler gives us raw TypeScript code, instead of stripping the types first before handing it to us. Rolldown did this, and this change makes it possible to use unplugin-typegpu with rolldown/tsdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep
There is a hidden option in the
this.parse
API, wherelang: 'ts'
has to be passed in, as stated in rolldown/rolldown#5388