Closed AlexNodex closed 1 year ago
Maybe you need to add a matching eleventy.before
event listener that resets the compiled_sass[]
array?
eleventyConfig.on("eleventy.before", function (args) {
compiled_sass = [];
});
Maybe you need to add a matching
eleventy.before
event listener that resets thecompiled_sass[]
array?eleventyConfig.on("eleventy.before", function (args) { compiled_sass = []; });
Thanks for your input, this fixes the first issue :), but not the second. I think the second issue is related to it not reloading the .eleventy.js
properly on changes
I think the second issue is related to it not reloading the
.eleventy.js
properly on changes
I haven't tried it (since I don't generally use --watch or --serve), but you could try explicitly adding ".eleventy.js" as a watch target: https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
This is likely the same issue that was fixed as part of the compileCache
improvements for #2258. I put in a ton of work to make this better with 2.0.0-canary.19—so please retest after that version ships!
Thank you!
This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.
If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!
Describe the bug when running
eleventy --config=.eleventy.config.js --watch --serve
the watcher is doing two weird things.I have a custom sass handler to deal with
scss
files (because I want them bundled in to one large file.This all works fine. The issue is when I run the
--watch
option. On the first run it works fine, however, when I change a scss file it caches the old css options...Second weird bug....
While
--watch
ing, if I change the .eleventy.config.js file it doesn't pick up the scss files anymore from above and it require actrl-c
plus restart of the watcher to pick them up again!eleventy
is installed globally - would this have anything to do with it? I can't see how it would affect the first error, but perhaps the second?