Skip to content

Commit

Permalink
fix: use soft warning for node bundle warn
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 23, 2023
1 parent 0973ec6 commit f46566f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function checkNodeEnvironment() {
!globalThis.process?.versions?.node &&
!globalThis.process?.env.DISABLE_NODE_FETCH_NATIVE_WARN
) {
throw new Error(
"Node.js compatible build of `node-fetch-native` is being used in a non-Node.js environment. Please make sure you are using proper export conditions or report this issue to https://github.com/unjs/node-fetch-native. You can set `process.env.DISABLE_NODE_FETCH_NATIVE_WARN` to disable this warning.",
console.warn(
"[node-fetch-native] Node.js compatible build of `node-fetch-native` is being used in a non-Node.js environment. Please make sure you are using proper export conditions or report this issue to https://github.com/unjs/node-fetch-native. You can set `process.env.DISABLE_NODE_FETCH_NATIVE_WARN` to disable this warning.",
);
}
}

0 comments on commit f46566f

Please sign in to comment.