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

[Feature Request] Please provide template optimizations #720

Open
Maxim-Mazurok opened this issue Aug 14, 2024 · 0 comments
Open

[Feature Request] Please provide template optimizations #720

Maxim-Mazurok opened this issue Aug 14, 2024 · 0 comments
Labels
question Further information is requested

Comments

@Maxim-Mazurok
Copy link
Contributor

🧐 Problem Description

As mentioned in vuejs/rfcs#388, I'd love to see template optimization with hoisting static elements.

💻 Sample code

Here's an example from https://vuejs.org/guide/extras/rendering-mechanism.html#static-hoisting,

You can see on the left - .vue compiled uses hoisting. On the right - TSX/JSX compiled - doesn't use hoisting, both using the same source.

image

<div>
  <div>foo</div>
  <div>bar</div>
  <div>{dynamic}</div>
</div>

🚑 Other information

I have tried to use vueJsx({ optimize: true }) from @vitejs/plugin-vue-jsx which I believe uses this plugin and passes this option to it, but it didn't affect results. So I'm assuming this has not been implemented yet. Looking forward to it, thanks!

@Maxim-Mazurok Maxim-Mazurok added the question Further information is requested label Aug 14, 2024
@Maxim-Mazurok Maxim-Mazurok changed the title [Question] Please provide template optimizations [Feature Request] Please provide template optimizations Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant