Skip to content

Commit 92926df

Browse files
committed
fix: buildStart and buildEnd hook of patched rolldown optimizer plugins still referenced isScanner
1 parent 3db0b4d commit 92926df

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

packages/vite-plugin-svelte/src/utils/optimizer-plugins.js

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,23 +89,13 @@ export function patchRolldownOptimizerPlugin(plugin, options) {
8989
}
9090
}
9191
};
92-
plugin.buildStart = {
93-
handler: () => {
94-
if (isScanner) {
95-
return;
96-
}
97-
statsCollection = options.stats?.startCollection(statsName, {
98-
logResult: (c) => c.stats.length > 1
99-
});
100-
}
92+
plugin.buildStart = () => {
93+
statsCollection = options.stats?.startCollection(statsName, {
94+
logResult: (c) => c.stats.length > 1
95+
});
10196
};
102-
plugin.buildEnd = {
103-
handler: () => {
104-
if (isScanner) {
105-
return;
106-
}
107-
statsCollection?.finish();
108-
}
97+
plugin.buildEnd = () => {
98+
statsCollection?.finish();
10999
};
110100
}
111101
};

0 commit comments

Comments
 (0)