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

devtools custom tab ignores app baseURL #395

Open
jdhartley opened this issue Nov 21, 2024 · 1 comment
Open

devtools custom tab ignores app baseURL #395

jdhartley opened this issue Nov 21, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jdhartley
Copy link

Describe the bug
When opening the tab on an app that uses a baseURL, the devtools <iframe> loads the incorrect URL

The DEVTOOLS_UI_PATH is set to '/__nuxt-devtools-fonts' but should support '/prefix/__nuxt-devtools-fonts' when a baseURL is defined

To reproduce
Set up your nuxt config with

	app: {
		baseURL: '/prefix/',
	},

You will see the <iframe src> is lacking the baseURL. This is most noticeable when your app is served via a proxy

Additional context
I have seen other libraries join nuxt.options.app.baseURL to fix

addCustomTab({
  view: {
    type: 'iframe',
    src: joinURL(nuxt.options.app?.baseURL, '/__nuxt-devtools-fonts'),

I will try to submit a PR with a fix but wanted to open this issue first

@danielroe
Copy link
Member

thank you - that would be a great fix if you have time to open it 🙏

@danielroe danielroe added bug Something isn't working good first issue Good for newcomers labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants