mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
node: make process global (denoland/deno#4985)
This commit is contained in:
parent
fa4dfd38d3
commit
26493ca172
@ -69,7 +69,7 @@ they are stable:
|
||||
## CommonJS Module Loading
|
||||
|
||||
`createRequire(...)` is provided to create a `require` function for loading CJS
|
||||
modules.
|
||||
modules. It also sets supported globals.
|
||||
|
||||
```ts
|
||||
import { createRequire } from "https://deno.land/std/node/module.ts";
|
||||
|
@ -37,3 +37,10 @@ export const process = {
|
||||
return [Deno.execPath(), ...Deno.args];
|
||||
},
|
||||
};
|
||||
|
||||
Object.defineProperty(globalThis, "process", {
|
||||
value: process,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user