-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(ecmascript): support configurable emotion options #4458
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Ignored Deployments
|
🟢 CI successful 🟢Thanks |
66190bc
to
814cfea
Compare
f9e1571
to
fd14bd5
Compare
✅ This changes can build |
fd14bd5
to
1f88f0e
Compare
Emotion, | ||
Emotion { | ||
#[serde(default)] | ||
sourcemap: bool, |
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.
Can we just always enable the sourcemap?
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.
for now, this inherits what next.config.js allow to configure. I hope to simplify / consolidate but thinking about feature parity to existing next.js configs we may need to expose.
#[turbo_tasks::value(shared)] | ||
#[derive(Default, Clone, Debug)] | ||
pub struct EmotionTransformOptions { | ||
pub enabled: bool, |
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.
Do we need an enabled
if the enable_emotion
if this is only used inside an Option
wrapper? Shouldn't the Some(EmotionTransformOptions)
imply that it is enabled?
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.
That's how I started, and then ends up this was somewhat more ergonomics when try to read next.config.js, we have couple of conditions
- if compiler option non-exists - None
- if exists, somehow user configures
emotion: false
oremotion: {enabled :false}
and having Option was easier to gracefully read & create config value among those conditions. It is possible to argue who would do 2 (if you specifiy compiler option, explicitly disabling it is non common) but that's certainly possible case if someone relies on some dynamic evaluation based on env / fn.
1f88f0e
to
3ce7565
Compare
### Description Related with WEB-669. PR implements initial path to configuring emotion transforms. It doesn't fully implement all of the options values though -`auto-label` have different values between next.config.js to the swc's actual transform options, as well as `importMap`. These will be gradually follow up since it is not an immediate blocker for the feature itself.
…epo#4458) ### Description Related with WEB-669. PR implements initial path to configuring emotion transforms. It doesn't fully implement all of the options values though -`auto-label` have different values between next.config.js to the swc's actual transform options, as well as `importMap`. These will be gradually follow up since it is not an immediate blocker for the feature itself.
…epo#4458) ### Description Related with WEB-669. PR implements initial path to configuring emotion transforms. It doesn't fully implement all of the options values though -`auto-label` have different values between next.config.js to the swc's actual transform options, as well as `importMap`. These will be gradually follow up since it is not an immediate blocker for the feature itself.
…epo#4458) ### Description Related with WEB-669. PR implements initial path to configuring emotion transforms. It doesn't fully implement all of the options values though -`auto-label` have different values between next.config.js to the swc's actual transform options, as well as `importMap`. These will be gradually follow up since it is not an immediate blocker for the feature itself.
Description
Related with WEB-669.
PR implements initial path to configuring emotion transforms. It doesn't fully implement all of the options values though -
auto-label
have different values between next.config.js to the swc's actual transform options, as well asimportMap
. These will be gradually follow up since it is not an immediate blocker for the feature itself.