ESBuild plugin to polyfill Node.js built-ins and globals, geared towards edge environments and Deno (including Deno Deploy). It consists of two plugins: polyfillNode, which should work for most cases, and polyf
Latest version: 0.2.3, last published: 2 years ago. Start using @esbuild-plugins/node-globals-polyfill in your project by running `npm i @esbuild-plugins/node-globals-polyfill`. There are 127 other projects in the npm registry using @esbuild-plugins/node
import{ NodeGlobalsPolyfillPlugin }from'@esbuild-plugins/node-globals-polyfill'import{ build }from'esbuild'build({ plugins: [ NodeGlobalsPolyfillPlugin({ process:true, buffer:true, define: {'process.env.var':'"hello"'},// inject will override define, to keep env vars you must also pass ...
globals.process: Whether to inject the process global. Disable it to prevent process.env.NODE_ENV from pulling in the process-es6 polyfill. You can use the define option to replace process.env.NODE_ENV instead. Default: true. polyfills: Polyfills to inject. It's an object where the keys ...
remorses3.8mISC0.2.3 null readme https://yarn.pm/@esbuild-plugins/node-globals-polyfill copy remorses/esbuild-plugins@esbuild-plugins/node-globals-polyfill Use it $yarn add @esbuild-plugins/node-globals-polyfill Try in RunKit·Browse Files ...
@esbuild-plugins/node-globals-polyfill Polyfills nodejs globals likeprocess import{NodeGlobalsPolyfillPlugin}from'@esbuild-plugins/node-globals-polyfill'import{build}from'esbuild'build({plugins:[NodeGlobalsPolyfillPlugin({process:true,buffer:true,define:{'process.env.var':'"hello"'},// inject will...
0.2.3•Public• Published2 years ago This package does not have a README.Add a READMEto your package so that users know how to get started. Readme Keywords none Install npm i@esbuild-plugins/node-globals-polyfill Repository github.com/remorses/esbuild-plugins ...
0.2.2•Public• Published2 years ago Dependencies (2) escape-string-regexp rollup-plugin-node-polyfills Dev Dependencies (3) @esbuild-plugins/node-globals-polyfill safe-buffer test-support Install npm i@esbuild-plugins/node-modules-polyfill ...
Breadcrumbs esbuild-plugin-polyfill-node / tsup.config.ts Latest commit Cannot retrieve latest commit at this time. HistoryHistory File metadata and controls Code Blame 10 lines (9 loc) · 165 Bytes Raw import { defineConfig } from "tsup"; export default defineConfig([ { entry: ["src...
import{build}from"esbuild";import{polyfillNode}from"esbuild-plugin-polyfill-node";build({entryPoints:["src/index.js"],bundle:true,outfile:"dist/bundle.js",plugins:[polyfillNode({// Options (optional)}),],}); Options globals.buffer: Whether to inject theBufferglobal. Disable it to prevent ...