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

Trigger reload on css change #88

Open
julientaq opened this issue Sep 2, 2024 · 2 comments
Open

Trigger reload on css change #88

julientaq opened this issue Sep 2, 2024 · 2 comments

Comments

@julientaq
Copy link

julientaq commented Sep 2, 2024

We’re using paged.js to make PDF from the web.

The way paged.js work is a bit different from the normal web, as it pull all the stylesheet into a couple of style element (after modifying them a bit).

This means that when we update a css, we need to have a full reload and not a css update, a proper full reload.

It looks like from here that the CSS doesnt trigger a reload.

would it be possible to add a config key to force a page reload, even on css update?

@julientaq
Copy link
Author

julientaq commented Sep 2, 2024

Made a workin example (with (what i think) is a very dirty code, but wanted to see how complex that was.

main...julientaq:eleventy-dev-server:main

i’m passing the value of the argv.cssforcereload to the browser before loading the client js, and check that value to trigger a css rebuild (or keep the previously working setup).

i’m a bit bothered because the linter did its own thing and made the commits a bit harder to follow. I couldn’t find any options for writing code styles @zachleat.

Did i completely missed it?

Tell me if you think that is worth a PR. (also, i assume that we’ll need to push that option to eleventy in a second movement).

@julientaq
Copy link
Author

just tested with my setup, and it’s working amazingly well with incremental.

(again, 11ty is the most interesting piece of web dev i’ve ever seen, thanks for all the work).

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