Skip to content

Commit

Permalink
Merge pull request #3078 from evidence-dev/hotfix/hide-node-cjs-warning
Browse files Browse the repository at this point in the history
[hotfix] chore: override process warnings from node
  • Loading branch information
ItsMeBrianD authored Feb 6, 2025
2 parents 8a5b147 + b0c5f5c commit 21aa623
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fluffy-apples-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/evidence': patch
---

Mute a warning that is caused by ESM/CJS interactions. There is an upcoming fix for this issue
12 changes: 12 additions & 0 deletions packages/evidence/scripts/build-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@ fsExtra.outputFileSync(
import { log } from "@evidence-dev/sdk/logger";
import { evidenceThemes } from '@evidence-dev/tailwind/vite-plugin';
process.removeAllListeners('warning');
process.on('warning', (warning) => {
if (warning.name === 'ExperimentalWarning' &&
warning.message.includes('CommonJS module') &&
warning.message.includes('ES Module')) {
return;
}
console.warn(warning);
});
const logger = createLogger();
const strictFs = (process.env.NODE_ENV === 'development') ? false : true;
Expand Down

0 comments on commit 21aa623

Please sign in to comment.