Skip to content

Commit

Permalink
process.versions?.node
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 23, 2023
1 parent 91f5fed commit 28b8e8e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -218,15 +218,15 @@ export default declare(api => {
.then(WebAssembly.compile)
`;
return template.expression.ast`
typeof process === "object" && process.versions.node
typeof process === "object" && process.versions?.node
? ${node}
: ${web}
`;
};
break;
case p({ web: true, node: true, webIMR: false, nodeIMR: true }):
buildFetchAsync = specifier => template.expression.ast`
typeof process === "object" && process.versions.node
typeof process === "object" && process.versions?.node
? import("fs").then(fs =>
new WebAssembly.Module(fs.readFileSync(
new URL(${imr(specifier)})
Expand Down

0 comments on commit 28b8e8e

Please sign in to comment.