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

feat(nuxt): define a custom root element inside app.config - #8604

Closed
yassilah wants to merge 6 commits into
nuxt:mainfrom
yassilah:feat/custom-root-element
Closed

feat(nuxt): define a custom root element inside app.config#8604
yassilah wants to merge 6 commits into
nuxt:mainfrom
yassilah:feat/custom-root-element

Conversation

@yassilah

@yassilahyassilah commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

🔗 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

Resolvesnuxt/nuxt#15312 and nuxt/nuxt#15132.
There's probably a better place to customize the root element selector than app.config but it allowed for a very simple implementation and for retrieving that root container from wherever we want inside the app using useAppConfig(), which might be useful in some cases

📝 Checklist

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

@codesandbox

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify

netlifyBot commented Nov 1, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs ready!

NameLink
🔨 Latest commit46b558a
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/636cd3ddf373a7000a0c0320
😎 Deploy Previewhttps://deploy-preview-8604--nuxt3-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@HigherOrderLogic

Copy link
Copy Markdown
Contributor

It would be nice if you also add an option to change the window.__NUXT__ script to something like window.__FOO__.

Comment threadpnpm-lock.yaml Outdated
@TheAlexLichter

Copy link
Copy Markdown
Member

It would be nice if you also add an option to change the window.__NUXT__ script to something like window.__FOO__.

I don't think this will be feasible to maintain, see nuxt/nuxt#15132

mohsin
mohsin approved these changes Nov 3, 2022
@pi0

pi0 commented Nov 10, 2022

Copy link
Copy Markdown
Member

Thanks for PR @yassilah ❤️ I've made a slightly different implementation that we are also able to change renderer behavior based on configuration: #8883

@pi0pi0 closed this Nov 10, 2022
@yassilah

Copy link
Copy Markdown
ContributorAuthor

that's much better, this way i don't even need a nitro plugin to render my custom div!

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customize app root element

7 participants

@yassilah@HigherOrderLogic@TheAlexLichter@pi0@mohsin@Aareksio@danielroe