Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): remove literal <script setup> from comment #6331

Merged
merged 1 commit into from
Aug 3, 2022
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Seems there's a compiler bug (which I will look into) giving this error when using client-only. This PR is a hotfix.

 ERROR  [@vue/compiler-sfc] Missing semicolon. (1:10)                                                  12:30:39

anonymous.vue
22 |    const { setup, render: _render, template: _template } = component
23 |    if (_render) {
24 |      // override the component render (non <script setup> component)
   |                                                                    ^
25 |      component.render = (ctx, ...args) => {
26 |        return ctx.mounted$

  
  anonymous.vue
  22 |    const { setup, render: _render, template: _template } = component
  23 |    if (_render) {
  24 |      // override the component render (non <script setup> component)
  |                                                                    ^
  25 |      component.render = (ctx, ...args) => {
  26 |        return ctx.mounted$
  at instantiate (node_modules/@babel/parser/lib/index.js:72:32)
  at constructor (node_modules/@babel/parser/lib/index.js:359:12)
  at Object.raise (node_modules/@babel/parser/lib/index.js:3339:19)
  at Object.semicolon (node_modules/@babel/parser/lib/index.js:4000:10)
  at Object.parseExpressionStatement (node_modules/@babel/parser/lib/index.js:15244:10)

πŸ“ Checklist

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

@netlify
Copy link

netlify bot commented Aug 3, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit a558f0e
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62ea5d130af0a20008be1a64

@danielroe danielroe self-assigned this Aug 3, 2022
@danielroe danielroe requested a review from pi0 August 3, 2022 11:34
@pi0
Copy link
Member

pi0 commented Aug 3, 2022

Could it be related to one of our internal transforms?

@atinux
Copy link
Member

atinux commented Aug 3, 2022

Approved as a hotfix (cannot run docus theme locally now), I let you find the root cause πŸ€

@danielroe
Copy link
Member Author

Yes, I'm looking into root cause. πŸ‘

@pi0 pi0 merged commit fbe2459 into main Aug 3, 2022
@pi0 pi0 deleted the fix/compiler-hiccup branch August 3, 2022 11:49
@danielroe
Copy link
Member Author

~> nuxtlabs/nuxt-component-meta#35

@pi0
Copy link
Member

pi0 commented Aug 3, 2022

@danielroe Does it mean Nuxt and Vite defaults are safe?

@danielroe
Copy link
Member Author

No problem with Nuxt. It was a wrong usage of the SFC parser.

@pi0 pi0 mentioned this pull request Aug 5, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants