-
Notifications
You must be signed in to change notification settings - Fork 306
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: add treeshakeCompensation
to esbuild plugin
#457
fix: add treeshakeCompensation
to esbuild plugin
#457
Conversation
Thanks for the quick fix to documentation, but could you instead setting |
@nmn will add. thanks for letting me know 👍 |
tsconfig
setup info to esbuild-plugin
docstreeshakeCompensation
to esbuild plugin
updated the PR |
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.
Changes look good, but there is a failing test.
@@ -115,6 +115,7 @@ export default function stylexPlugin({ | |||
jsxSyntaxPlugin, | |||
stylexBabelPlugin.withOptions({ | |||
...options, | |||
treeshakeCompensation: true, |
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.
Ideally, you should make treeshakeCompensation
an optional argument that defaults to true
.
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.
I think moving it above ...options
should suffice?
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.
Yeah this should work.
What changed / motivation ?
This PR adds
treeshakeCompensation: true
to stylex babel plugin in esbuild plugin to avoid elision of modules. It also adds an esbuild plugin test case forTypeScript
files.Linked PR/Issues
Fixes #454
Pre-flight checklist
Contribution Guidelines