Skip to content

Commit

Permalink
invoke rollup log handler to log anything other than the circular dep…
Browse files Browse the repository at this point in the history
…endecies in data package
  • Loading branch information
becky-gilbert committed Feb 14, 2025
1 parent 37988f5 commit 2eea9a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ export function makeRollupConfig(iifeName) {
* @param log - Log object containing location, frame, and message.
* @param handler - Function called to record log.
*/
const onLog = (level, log) => {
const onLog = (level, log, handler) => {
// Don't log known circular dependencies with the data package.
if (log.code === "CIRCULAR_DEPENDENCY" && iifeName === packages.data.iife) {
if (knownCircularDeps.some((value) => log.message.includes(value))) {
return;
}
}
handler(level, log);
};

return jsPsychMakeRollupConfig(iifeName).map((config) => {
Expand Down

0 comments on commit 2eea9a5

Please sign in to comment.