Skip to content

Commit

Permalink
ensure changedContent gets cleared
Browse files Browse the repository at this point in the history
Otherwise this list gets bigger and bigger, not only that there is a
subtle bug. The moment you save a `.css` file we want to create a new
context and start from scratch. However, since the list was never
cleared, it meant that every subsequent save to *any* file (not only
config / css files) creates a new context...

By clearing the least we should work around this problem.
  • Loading branch information
RobinMalfait committed Oct 20, 2022
1 parent 955f968 commit 1a15f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/build/watching.js
Expand Up @@ -62,7 +62,7 @@ export function createWatcher(args, { state, rebuild }) {
extension: path.extname(file).slice(1),
})

chain = chain.then(() => rebuild(changedContent))
chain = chain.then(() => rebuild(changedContent.splice(0)))

return chain
}
Expand Down

0 comments on commit 1a15f22

Please sign in to comment.