-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Always show 404 page on all pages except root #15
Comments
@zoxon weird, can you provide a minimal repro? I'll check it later... |
@zoxon tested with latest Astro version and it is working properly |
@userquin I tried to create a minimal reproduction, but without success. Everything works as expected, not sure what the problem is. Do you have any ideas or ways of debugging? |
If change config to I get the error "Uncaught (in promise) non-precached-url: createHandlerBoundToURL('/') was called, but that URL is not precached. Please pass in a URL that is precached instead." and stay on the same page. But it works when developer console is closed |
@zoxon can you check #16 (comment) ? |
We decided not to use this in production until it worked stably. In any case, we're not using SSR yet |
I encounter the similar problem. Here is the reproduction.
But in It seems in Astro the I patch the package to disable the // src/index.ts
if (useWorkbox.navigateFallback === undefined)
useWorkbox.navigateFallback = config.base ?? config.vite?.base ?? '/' // astro.config.ts
// ...
workbox: {
// ...
navigateFallback: null
} |
@Clarkkkk if you set the fallback to null, offline will not work. I'll try to add similar patch to this added to Vitepress integration ( when I have time ): https://github.com/vite-pwa/vitepress/pull/23/files#diff-616b1f25a229de030f09926b82dafdc6aa0c93a00bd851f2b1f41796570fd629 |
@Clarkkkk it seems a problem with Astro 3, the pwa integration hook being called before Astro builds the dist folder (check there is a workbox-build warning about regex): |
@userquin I notice that too. But it turns out that the plugin will be called twice, before and after the generation of html files. And the generated |
@Clarkkkk I don't think so, first [build] at the bottom should be before the workbox warning: |
check also the sitemap, there is no entry with last modified, only the paths |
I am not familiar with the whole process. It is called twice in my test, for example using something like I notice that you're using |
Thank you, I simply use a start template, didn't check that.
I copy those lines from the doc, and it works on my windows, but relative path is better. |
If you add N entries to the glob patterns array, you will get N logs, 1 per entry. Astro generates the dist folder after the astro:build:done hook or in paralel (first [buid] log at bottom after the warnings). |
All links no longer work
After clicking on any link if developer console closed I see a 404 page, if open noting happens
My config
Click on /help/ link
The text was updated successfully, but these errors were encountered: