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

Default value of navigateFallbackAllowlist #139

Open
Perdjesk opened this issue May 31, 2024 · 0 comments
Open

Default value of navigateFallbackAllowlist #139

Perdjesk opened this issue May 31, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Perdjesk
Copy link

Perdjesk commented May 31, 2024

The default value for navigateFallbackAllowlist in devOptions is set to /\//.

nuxt/src/utils/config.ts

Lines 40 to 45 in 1069779

if (nuxt.options.dev) {
// on dev force always to use the root
options.workbox.navigateFallback = options.workbox.navigateFallback ?? nuxt.options.app.baseURL ?? '/'
if (options.devOptions?.enabled && !options.devOptions.navigateFallbackAllowlist)
options.devOptions.navigateFallbackAllowlist = [nuxt.options.app.baseURL ? new RegExp(nuxt.options.app.baseURL) : /\//]
}

While in vite-plugin-pwa and docs it is set to /^\/$/

https://github.com/vite-pwa/vite-plugin-pwa/blob/75b4fdc10de1716f44ba8ba3b993bfe02912b171/src/plugins/dev.ts#L167-L169
https://vite-pwa-org.netlify.app/guide/development#type-declarations

Potentially related: #77 #81 #56

@userquin userquin added bug Something isn't working enhancement New feature or request labels Jun 2, 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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants