{"_id":"esbuild-plugin-globals","_rev":"2800488","name":"esbuild-plugin-globals","description":"esbuild plugin that provides Webpack's externals functionality.","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"astephenb","email":"asbrown002@gmail.com"}],"time":{"modified":"2022-07-21T09:35:20.000Z","created":"2021-02-05T18:12:17.345Z","0.1.1":"2021-02-12T00:20:57.740Z","0.1.0":"2021-02-05T18:12:17.345Z"},"users":{},"author":{"name":"Andy Brown","email":"abrown.d.ts@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/a-b-r-o-w-n/esbuild-plugin-globals.git"},"versions":{"0.1.1":{"name":"esbuild-plugin-globals","version":"0.1.1","description":"esbuild plugin that provides Webpack's externals functionality.","main":"dist/plugin.js","types":"dist/plugin.d.ts","engines":{"node":">=7"},"scripts":{"prepublishOnly":"npm run build","clean":"rm -rf dist","build":"npm run clean && tsc"},"repository":{"type":"git","url":"git+https://github.com/a-b-r-o-w-n/esbuild-plugin-globals.git"},"keywords":["esbuild","esbuild-plugin"],"author":{"name":"Andy Brown","email":"abrown.d.ts@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals/issues"},"homepage":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals#readme","devDependencies":{"@typescript-eslint/eslint-plugin":"^4.14.2","@typescript-eslint/parser":"^4.14.2","commitizen":"^4.2.3","cz-customizable":"^6.3.0","esbuild":"^0.8.39","eslint":"^7.19.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.3.1","husky":"^4.3.8","lint-staged":"^10.5.3","prettier":"^2.2.1","typescript":"^4.1.3"},"volta":{"node":"14.15.4","npm":"7.5.2"},"config":{"commitizen":{"path":"node_modules/cz-customizable"}},"husky":{"hooks":{"pre-commit":"lint-staged","prepare-commit-msg":"exec < /dev/tty && git cz --hook || true"}},"lint-staged":{"**/*.{ts,md,json}":["prettier --write"]},"gitHead":"6fcb8ed7c20d84e634114c33d91bab6c8ae4ff8a","_id":"esbuild-plugin-globals@0.1.1","_nodeVersion":"14.15.4","_npmVersion":"7.5.2","dist":{"shasum":"ee1f9fa91fce3c6b675e1fd07edf4f5f9c0a2097","size":2471,"noattachment":false,"key":"/esbuild-plugin-globals/-/esbuild-plugin-globals-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/esbuild-plugin-globals/download/esbuild-plugin-globals-0.1.1.tgz"},"_npmUser":{"name":"astephenb","email":"asbrown002@gmail.com"},"directories":{},"maintainers":[{"name":"astephenb","email":"asbrown002@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esbuild-plugin-globals_0.1.1_1613089257526_0.09811089245723803"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T22:48:29.047Z","publish_time":1613089257740,"_cnpm_publish_time":1613089257740},"0.1.0":{"name":"esbuild-plugin-globals","version":"0.1.0","description":"esbuild plugin that provides Webpack's externals functionality.","main":"dist/plugin.js","types":"dist/plugin.d.ts","engines":{"node":">=7"},"scripts":{"prepublishOnly":"npm run build","clean":"rm -rf dist","build":"npm run clean && tsc"},"repository":{"type":"git","url":"git+https://github.com/a-b-r-o-w-n/esbuild-plugin-globals.git"},"keywords":["esbuild","esbuild-plugin"],"author":{"name":"Andy Brown","email":"abrown.d.ts@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals/issues"},"homepage":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals#readme","devDependencies":{"@typescript-eslint/eslint-plugin":"^4.14.2","@typescript-eslint/parser":"^4.14.2","commitizen":"^4.2.3","cz-customizable":"^6.3.0","esbuild":"^0.8.39","eslint":"^7.19.0","eslint-config-prettier":"^7.2.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.3.1","husky":"^4.3.8","lint-staged":"^10.5.3","prettier":"^2.2.1","typescript":"^4.1.3"},"volta":{"node":"14.15.4","npm":"7.5.2"},"config":{"commitizen":{"path":"node_modules/cz-customizable"}},"husky":{"hooks":{"pre-commit":"lint-staged","prepare-commit-msg":"exec < /dev/tty && git cz --hook || true"}},"lint-staged":{"**/*.{ts,md,json}":["prettier --write"]},"gitHead":"f682259a8cad36cf6f3f7728bc60a710fdf92ac2","_id":"esbuild-plugin-globals@0.1.0","_nodeVersion":"14.15.4","_npmVersion":"7.5.2","dist":{"shasum":"dd66845cfafca51786905e0a6ea3cf610eb84456","size":2467,"noattachment":false,"key":"/esbuild-plugin-globals/-/esbuild-plugin-globals-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/esbuild-plugin-globals/download/esbuild-plugin-globals-0.1.0.tgz"},"_npmUser":{"name":"astephenb","email":"asbrown002@gmail.com"},"directories":{},"maintainers":[{"name":"astephenb","email":"asbrown002@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/esbuild-plugin-globals_0.1.0_1612548737205_0.8840189266171519"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T22:48:28.154Z","publish_time":1612548737345,"_cnpm_publish_time":1612548737345}},"readme":"# esbuild-plugin-globals\n\nProvides Webpack's [externals](https://webpack.js.org/configuration/externals/) functionality for [esbuild](https://webpack.js.org/configuration/externals/).\n\n## Install\n\nnpm:\n\n```bash\nnpm install --save-dev esbuild-plugin-globals\n```\n\nyarn:\n\n```bash\nyarn add --dev esbuild-plugin-globals\n```\n\n## Usage\n\n```js\nimport esbuild from \"esbuild\";\nimport GlobalsPlugin from \"esbuild-plugin-globals\";\n\nesbuild.build({\n  entryPoints: [\"src/index.ts\"],\n  bundle: true,\n  plugins: [\n    GlobalsPlugin({\n      /**\n       * Simple string pattern\n       * Any module matching \"react\" will be replaced with\n       * `module.exports = React`\n       */\n      react: \"React\",\n      /**\n       * Regular expression + resolver function\n       * Invoked with matched module name and returns the module exports (or undefined).\n       */\n      \"@some-scope/.*\": (moduleName) => {\n        /** strip the scope */\n        const name = name.substring(12);\n        /** generates module.exports = CamelCasedName */\n        return camelCase(name);\n      },\n    }),\n  ],\n});\n```\n","_attachments":{},"homepage":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals#readme","bugs":{"url":"https://github.com/a-b-r-o-w-n/esbuild-plugin-globals/issues"},"license":"MIT"}