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

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

Closed
wants to merge 6 commits into from

Conversation

yassilah
Copy link
Contributor

@yassilah yassilah commented Nov 1, 2022

πŸ”— 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

Resolves nuxt/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

codesandbox bot commented Nov 1, 2022

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

@netlify
Copy link

netlify bot commented Nov 1, 2022

βœ… Deploy Preview for nuxt3-docs ready!

Name Link
πŸ”¨ Latest commit 46b558a
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/636cd3ddf373a7000a0c0320
😎 Deploy Preview https://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
Contributor

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

pnpm-lock.yaml Outdated Show resolved Hide resolved
@manniL
Copy link
Member

manniL commented Nov 2, 2022

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

@pi0
Copy link
Member

pi0 commented Nov 10, 2022

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

@pi0 pi0 closed this Nov 10, 2022
@yassilah
Copy link
Contributor Author

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

@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize app root element
7 participants