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

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

Merged
pi0 merged 1 commit into
mainfrom
fix/compiler-hiccup
Aug 3, 2022
Merged

fix(nuxt): remove literal <script setup> from comment#6331
pi0 merged 1 commit into
mainfrom
fix/compiler-hiccup

Conversation

@danielroe

Copy link
Copy Markdown
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

netlify Bot commented Aug 3, 2022

Copy link
Copy Markdown

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

pi0 commented Aug 3, 2022

Copy link
Copy Markdown
Member

Could it be related to one of our internal transforms?

@atinux

atinux commented Aug 3, 2022

Copy link
Copy Markdown
Member

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

@danielroe

Copy link
Copy Markdown
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
Copy Markdown
Member Author

~> nuxt-content/nuxt-component-meta#35

@pi0

pi0 commented Aug 3, 2022

Copy link
Copy Markdown
Member

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

@danielroe

Copy link
Copy Markdown
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