parceleventy
parceleventy copied to clipboard
Browsersync loop
I often find when saving the document browsersync seems to get itself stuck in a little bit of a rebuild loop.
The attached screenshot is an example of one such situation. This is just one document change & save. I did nothing else in the project in that time other than watch the terminal output.
Yeah, this project is, unfortunately, a bit of a "hack", as parcel and 11ty don't play well together.
During development a parcel plugin watches .tmp/11ty
and generates an html file in the .tmp/parcel
directory that notifies parcel when files are added and removed, because parcel's dev server does not track new files added after the build begins that are not referenced by the original files.
This can causes the parcel build to be re-run multiple times.
Great, thanks for the info. After using this for a small personal project, I suggested we use this for a production site. For the most part it's working great, but I am finding that the rebuilding is a little annoying in a development environment. Plan to look into it a little more and will report back if we're able to find a solution.
@nothingrandom I'm not too familiar with the architecture of this project, but I'd suggest having Parcel watch the Eleventy output directory using it's built-in parcel watch
command rather than a plugin to sync the two.
Since a note was added to this project stating it is not actively maintained any more, I feel less bad about recommending taking a look at a project I've been working on: eleventy-parcel-boilerplate. It does essentially the same thing as this project, but I feel the watching functionality might be more reliable.
this project is, unfortunately, a bit of a "hack", as parcel and 11ty don't play well together.
An alternative: https://github.com/vseventer/eleventy-parcel-boilerplate