core
core copied to clipboard
feat(complier-sfc): add `hoistStatic` for `<script setup>`
closes #5750
Introduce a option hoistStatic
in script
.
Only enables when there's only one <script setup>
(enabled by default)
Fix these cases
_useCssVars
should be put inside of setup
enum
shouldn't be hoisted
Deploy Preview for vuejs-coverage failed.
Name | Link |
---|---|
Latest commit | 02081e08004a02c758526862e6ab3794e9707f42 |
Latest deploy log | https://app.netlify.com/sites/vuejs-coverage/deploys/63d2b44c6f5a0c000832157d |
Deploy Preview for vue-next-template-explorer ready!
Name | Link |
---|---|
Latest commit | ef61ebe326e91400407afc8bf3da53312e437f4d |
Latest deploy log | https://app.netlify.com/sites/vue-next-template-explorer/deploys/625fc7ead944db000863edf3 |
Deploy Preview | https://deploy-preview-5752--vue-next-template-explorer.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for vue-sfc-playground ready!
Name | Link |
---|---|
Latest commit | ef61ebe326e91400407afc8bf3da53312e437f4d |
Latest deploy log | https://app.netlify.com/sites/vue-sfc-playground/deploys/625fc7ea8b6c1f00081d3521 |
Deploy Preview | https://deploy-preview-5752--vue-sfc-playground.netlify.app/ |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
If this feature is acceptable, I will add a Unit Test for it later.
This is great. Let's add some tests for it
I'm considering whether this feature is enabled by default, or is it an experimental feature and not enabled by default?
@yyx990803 Added.
/ecosystem-ci run
📝 Ran ecosystem CI: Open
suite | result |
---|---|
nuxt | :x: failure |
pinia | :white_check_mark: success |
router | :white_check_mark: success |
test-utils | :x: failure |
vite-plugin-vue | :x: failure |
vitepress | :white_check_mark: success |
I think this may have introduced a regression: #7973. I'm not sure of the cause, but testing locally it seems to work fine prior to this being merged.