Skip to content

add pragma option and support @jsx annotation #322

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

Merged
merged 4 commits into from
Feb 28, 2021
Merged

Conversation

Jokcy
Copy link
Contributor

@Jokcy Jokcy commented Feb 20, 2021

🤔 What is the nature of this change?

New feature

🔗 Related Issue

#312

💡 Background

Custom jsx pragma is very useful in some situation. For example css in emotionjs and mdx are all depend on custom pragma.

📝 Changelog

Language Changelog
🇺🇸 English Add pragma option; Support @jsx pragma annotation
🇨🇳 Chinese 增加pragma配置项;支持@jsx pragma注解;

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • [-] Doc is updated/provided or not needed
  • [-] Demo is updated/provided or not needed
  • [-] TypeScript definition is updated/provided or not needed
  • [-] Changelog is provided or not needed

Unverified

This user has not yet uploaded their public signing key.
@@ -129,6 +134,21 @@ export default ({ types }: typeof BabelCore) => ({
});
});
}

if (state.opts.pragma) {
state.set('createVNode', () => t.identifier(state.opts.pragma!));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.identifier(state.opts.pragma) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Em... I'm not sure why my vscode emit error on this;

截屏2021-02-24 下午3 15 35

And any idea the Type of file? I could not find and defination from @babel/types;

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
@Amour1688 Amour1688 merged commit ec50fdd into vuejs:dev Feb 28, 2021
@Jokcy
Copy link
Contributor Author

Jokcy commented Mar 1, 2021

Nice work! Glad to help😄

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.

None yet

2 participants