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

HMR with custom styles #21

Open
jeremyvienney opened this issue Apr 11, 2023 · 0 comments
Open

HMR with custom styles #21

jeremyvienney opened this issue Apr 11, 2023 · 0 comments

Comments

@jeremyvienney
Copy link

jeremyvienney commented Apr 11, 2023

Hello,

Shopify CLI seems to automatically sync all files inside the /shopify folder by detecting if there has been a change to the file, if not the page will reload completely.
It's perfect because it allows you to have a HMR like for static files that don't go through tailwind & postcss via vite.
But for everything that is "custom" located in the src folder, I can't get the HMR to work.
Inside the src directory, files are handled by vite and then exported in the shopify/assets folder, replacing the index.min.css and js file.
So normally, shopify cli should detect a change in those file and inject new code.
But each time I save them I get a complete reload.
This is a strange behavior and I cannot figure why, has anyone ever managed to get the HMR to work via the default configuration?

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

1 participant