Skip to content

Problem with beforeBuild and fse.copySync (fs-extra), when rebuilding... endless loop of rebuilding. #2160

Answered by michelbaas
michelbaas asked this question in Q&A
Discussion options

You must be logged in to vote

So I have solved the problem by moving the copySync code from above into it's own file; titles.js.
This file is called with 'npm run titles'... or optional in combination with 'npm run start' or 'npm run build' scripts (in package.json).

I'm content with this solution.

But, the beforeBuild problem when rebuilding with the copySync code in .eleventy.js –– is this a bug in Eleventy or is this caused because I might be using it in an unintentional way?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by michelbaas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant