Closed alvarotrigo closed 1 year ago
I believe the --incremental
flag is only intended for development, not production builds. When used in conjunction with serve
, the local server will only rebuild files/templates that changed and skip the rest. I may be mistaken, though.
Any update on this?
I'd be nice to only update those files that need to be updated.
In my case, I'm using rsync
to upload the new/modified files to the server and right now every time I change a single post, all the blog is uploaded again...
@alvarotrigo Are you hosting your site on Netlify? If so, netlify-plugin-11ty allows you to cache folders. You might not be able to cache posts, though. I don't believe there's currently a way to do this on the 11ty end; incremental builds are a dev-only thing.
Nope. My own host.
I think there are a few misunderstandings here, probably chiefly noted by @sentience at https://github.com/11ty/eleventy/issues/2760
That said, --incremental
is currently limited to local dev and runs a full build initially. You can use the 2.0 flag for --ignore-initial
to bypass this!
Docs: https://www.11ty.dev/docs/usage/#incremental-for-partial-incremental-builds
More info at: https://www.11ty.dev/docs/usage/incremental/
Running incremental builds on a build server is filed at https://github.com/11ty/eleventy/issues/2775
I'm using this on my package.json
This is my current
.eleventy.js
stripped off, the one I'm using to test this:Now, every time I run
npm run build
every single file inside the output folder (_site
) gets modified. The modification time of each file changes.Am I missing something?
I would expect the files to only be modified the the source file modification date changed too?