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 @refresh pragma #16

Open
edemaine opened this issue May 10, 2022 · 3 comments
Open

Default @refresh pragma #16

edemaine opened this issue May 10, 2022 · 3 comments

Comments

@edemaine
Copy link

Could we add an option (here and the solid-vite-plugin that includes this) to specify the default @refresh pragma, for files that don't override @refresh? And I guess we'd need to give a name to the current default behavior, so you could opt back into it. Maybe /* @refresh replace */?

Motivation: The more I experience HMR (e.g. changing solid-playground), the more I find it buggy for the types of changes I make; for certain types of testing/debugging, I really want the full page reload every time. I basically don't trust the HMR results and manually reload every time. So I'd like to be able to specify a default of /* @refresh reload */.

@lxsmnsyc
Copy link
Member

If we desire a full page reload by default, perhaps not using solid-refresh shouldn't be a problem? There isn't much difference to it.

@edemaine
Copy link
Author

edemaine commented May 11, 2022

I guess I imagined a code base that had some well-behaved files, which could be marked, while the rest are assumed side-effecty. But I'd probably be fine with turning solid-refresh on/off as needed (when editing styles/text vs doing complex code edits). Is there am easy way to do that with solid-vite-plugin though?

@lxsmnsyc
Copy link
Member

yes, with hot: false

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