Skip to content

Commit

Permalink
fix: only run on first build (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework authored Dec 24, 2024
1 parent 6898662 commit 56fa1c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ export const pluginPublint = (
}

api.onAfterBuild({
handler: async () => {
handler: async ({ isFirstCompile }) => {
// Only run on the first compile in watch mode, or on a single build
if (!isFirstCompile) {
return;
}

const { publint } = await import('publint');
const { formatMessage } = await import('publint/utils');

Expand Down

0 comments on commit 56fa1c2

Please sign in to comment.