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

fix(nuxt): island components with number prefix #24469

Merged
merged 6 commits into from Nov 28, 2023

Conversation

harlan-zw
Copy link
Contributor

@harlan-zw harlan-zw commented Nov 26, 2023

πŸ”— Linked issue

https://stackblitz.com/edit/nuxt-starter-xchkk1?file=app.vue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Using an island component that starts with a number completely breaks the island renderer, this is because it will introduce a syntax error within the template used to load the component.

import { defineAsyncComponent } from 'vue'
export const 2Foo = defineAsyncComponent(() => import("/home/harlan/packages/nuxt/playground/components/2Foo.island.vue" /* webpackChunkName: "components/2-foo-server" */).then(c => c.default || c))

To fix this I've just copied the convention used for the global components template.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Nov 26, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@harlan-zw
Copy link
Contributor Author

harlan-zw commented Nov 26, 2023

Not really sure what's going on with these failed tests, any ideas? Seems like a isolation / cache issue

@danielroe danielroe added the 3.x label Nov 28, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests βœ…

❗ No coverage uploaded for pull request base (main@e3b8b84). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24469   +/-   ##
=======================================
  Coverage        ?   58.65%           
=======================================
  Files           ?        5           
  Lines           ?      861           
  Branches        ?       46           
=======================================
  Hits            ?      505           
  Misses          ?      356           
  Partials        ?        0           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Copy link
Member

@huang-julien huang-julien left a comment

Choose a reason for hiding this comment

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

works locally πŸ‘ , ok for me

@danielroe danielroe added the bug label Nov 28, 2023
@danielroe danielroe merged commit 0f705f3 into main Nov 28, 2023
33 checks passed
@danielroe danielroe deleted the fix/islands-prefixed-with-number branch November 28, 2023 22:06
@github-actions github-actions bot mentioned this pull request Nov 28, 2023
@harlan-zw
Copy link
Contributor Author

Oh right! thanks @danielroe πŸ™‡β€β™‚οΈ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants