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

Changing <route> isn't picked up #52

Closed
jods4 opened this issue May 12, 2021 · 7 comments
Closed

Changing <route> isn't picked up #52

jods4 opened this issue May 12, 2021 · 7 comments

Comments

@jods4
Copy link

jods4 commented May 12, 2021

When modifying the <route> custom block of a page, the new information isn't available in the app even after a full reload.
It looks like the only way to see the changes is to restart Vite.

@hannoeru
Copy link
Owner

hannoeru commented May 12, 2021

It works in my environment, are you using Windows?

@hannoeru
Copy link
Owner

Can you try v0.11.2 works or not?

@jods4
Copy link
Author

jods4 commented May 12, 2021

I just tried 0.11.2 and it didn't work.

I'm on Windows, yes.

For example if I have a SFC with:

<route>
name: abc
</route>

Then I see the generated routes in browser with name: abc, as expected.

Now in dev mode, if I change name to say xyz:

  • I see Vite notices the changes and reloads the file;
  • But the generated routes in browser stays abc until I restart Vite completely.

A similar issue is that if I add a <route> block to a file that has none, it isn't picked up either.

@hannoeru
Copy link
Owner

Just fixed another bug, can you try v0.11.3?

@jods4
Copy link
Author

jods4 commented May 17, 2021

I tried 0.11.3.
Seems to work better, I can change some things such as the path.

But other changes are still not picked up.
I use extendRoute() option to change things based on properties I put in <route>. Is it called again with a fresh new route after a file change?
The changes I make in extendRoute() don't appear in front-end even after a full page refresh.

@hannoeru
Copy link
Owner

Oh... I got it, will fix it later.

@jods4
Copy link
Author

jods4 commented May 18, 2021

@hannoeru I just tested 0.11.4 and can confirm it works 🎉
It looks like every page / route / property updates correctly without restarting Vite now.

... but it also introduced a major regression, see #55 😢

ckangwen pushed a commit to charrue/vite-plugin-pages that referenced this issue Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants