{"_id":"@cush/rollup-plugin-esbuild","_rev":"1-eeb7cd2a6df7b1f13b9d8c6f820aa976","name":"@cush/rollup-plugin-esbuild","dist-tags":{"latest":"2.5.2-canary.138"},"versions":{"2.5.2-canary.138":{"name":"@cush/rollup-plugin-esbuild","version":"2.5.2-canary.138","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"EGOIST"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/egoist/rollup-plugin-esbuild.git"},"scripts":{"test":"jest","example":"npm run build && rollup -c example/rollup.config.js","build":"ts-node scripts/build","prepublishOnly":"npm run build"},"devDependencies":{"@types/jest":"^26.0.15","@types/mock-fs":"^4.13.0","@types/node":"14.14.3","esbuild":"^0.8.0","jest":"^26.6.1","mock-fs":"^4.13.0","prettier":"^2.1.2","rollup":"^2.32.1","rollup-plugin-dts":"^1.4.10","ts-jest":"^26.4.2","ts-node":"^9.0.0","typescript":"^3.9.7"},"dependencies":{"@rollup/pluginutils":"^4.0.0","joycon":"^2.2.5","strip-json-comments":"^3.1.1"},"peerDependencies":{"esbuild":"^0.8.0"},"engines":{"node":">=12"},"gitHead":"cdb04610353d5f83254079b104f6e8bd4f00c837","description":"![npm version](https://badgen.net/npm/v/rollup-plugin-esbuild) ![npm downloads](https://badgen.net/npm/dm/rollup-plugin-esbuild)","bugs":{"url":"https://github.com/egoist/rollup-plugin-esbuild/issues"},"homepage":"https://github.com/egoist/rollup-plugin-esbuild#readme","_id":"@cush/rollup-plugin-esbuild@2.5.2-canary.138","_nodeVersion":"12.19.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-o/XoRSKRHgPoBW7fbcXWC1c6mP1VvAx3NKN5uJXtYoEh5PDigXOf5kLsXX2xwMDMi7UxXK1RUuf7QFeBKlAifg==","shasum":"99aa5b74b80db8c706aa3efa2571211bfc00e94b","tarball":"https://registry.npmjs.org/@cush/rollup-plugin-esbuild/-/rollup-plugin-esbuild-2.5.2-canary.138.tgz","fileCount":5,"unpackedSize":10176,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoLXCCRA9TVsSAnZWagAAQSQP/ir/ouODE6nm27YT2gno\n3zODgOFc+eUazjVdge7eotaCwQPVJvZaAJrcsYwNWQljgXJ286joXK8SuoUk\n47jFU/mT/QIUklePUxtYkWyG03/OWgp7ZeQk30GYIM5V5fLqAQAIP4iIB84f\nRdcTAfji+loXcJwsw7UNIX4XjvV2kp4/wsuM1+HP4D7n15VbDj5vZ45bCPvo\n/C2Qb8Vq2C3yBPYh0eLbuL6VkJVvedhLKNybgP6fQj9rl9jfMuj9Oxqs+QQU\nCPDQNUvN22WJaE/8bbCsS+EY3J4P2odIMqPbsZmB2gUCEhhkvRYkmbfu0zv3\nF1peUiWrxMHwbeFcmEA9B+0SVYS1LHKtFv+SrKxghAvcMZrlgi1A2jEAlva7\nJ/ppC8rXG6cs5ri4wjYqC6/ez0xL/NbtNoglCio2VONz7lOuLRKk+fPEjtyZ\nXrh/hSiTSpaaeUknxplpv4zrsqFvnjHRBfGiKadhOE3Y7KCd6DmlTTGI90oE\nx4J6/+uWrNVUeniVRlO5qAhZz3WE+KvWtoDi8SpRu88vgvB/uUJYvV/rASWd\nl7FGQYnkvBqK4rFmBwcg+S7Fp9lnUTmlKfiEteIzpLB9I1ApvsMLCRKu29b0\nFX/iGy7s3YakDJIyJ9oPo6SUXrWO6Phbs/UcI1y0eriV46l2Jo5S4soLZNlG\n5yxa\r\n=q8jH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHaO3EtQ6smRWRQIInGfOUzg0Ew7YDS/vQJD794WzhoRAiA74VmEKgMtrbZEj7w7I97sSHfuD2+oTO/5JBsIDCM8KA=="}]},"maintainers":[{"name":"aleclarson","email":"aleclarson@protonmail.com"}],"_npmUser":{"name":"aleclarson","email":"aleclarson@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rollup-plugin-esbuild_2.5.2-canary.138_1604367810315_0.7455765330026929"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-03T01:43:30.231Z","2.5.2-canary.138":"2020-11-03T01:43:30.449Z","modified":"2022-04-05T02:21:06.731Z"},"maintainers":[{"name":"aleclarson","email":"aleclarson@protonmail.com"}],"description":"![npm version](https://badgen.net/npm/v/rollup-plugin-esbuild) ![npm downloads](https://badgen.net/npm/dm/rollup-plugin-esbuild)","homepage":"https://github.com/egoist/rollup-plugin-esbuild#readme","repository":{"type":"git","url":"git+https://github.com/egoist/rollup-plugin-esbuild.git"},"author":{"name":"EGOIST"},"bugs":{"url":"https://github.com/egoist/rollup-plugin-esbuild/issues"},"license":"MIT","readme":"# rollup-plugin-esbuild\n\n![npm version](https://badgen.net/npm/v/rollup-plugin-esbuild) ![npm downloads](https://badgen.net/npm/dm/rollup-plugin-esbuild)\n\n[esbuild](https://github.com/evanw/esbuild) is by far one of the fastest TS/ESNext to ES6 compilers and minifier, this plugin replaces `rollup-plugin-typescript2`, `@rollup/plugin-typescript` and `rollup-plugin-terser` for you.\n\n## Install\n\n```bash\nyarn add esbuild rollup-plugin-esbuild --dev\n```\n\n## Usage\n\nIn `rollup.config.js`:\n\n```js\nimport esbuild from 'rollup-plugin-esbuild'\n\nexport default {\n  plugins: [\n    esbuild({\n      // All options are optional\n      include: /\\.[jt]sx?$/, // default, inferred from `loaders` option\n      exclude: /node_modules/, // default\n      sourceMap: false, // default\n      minify: process.env.NODE_ENV === 'production',\n      target: 'es2017' // default, or 'es20XX', 'esnext'\n      jsxFactory: 'React.createElement',\n      jsxFragment: 'React.Fragment'\n      // Like @rollup/plugin-replace\n      define: {\n        __VERSION__: '\"x.y.z\"'\n      },\n      // Add extra loaders\n      loaders: {\n        // Add .json files support\n        // require @rollup/plugin-commonjs\n        '.json': 'json',\n        // Enable JSX in .js files too\n        '.js': 'jsx'\n      }\n    }),\n  ],\n}\n```\n\n- `include` and `exclude` can be `String | RegExp | Array[...String|RegExp]`, when supplied it will override default values.\n- It uses `jsxFactory`, `jsxFragmentFactory` and `target` options from your `tsconfig.json` as default values.\n\n### Declaration File\n\nThere are serveral ways to generate declaration file:\n\n- Use `tsc` with `emitDeclarationOnly`, the slowest way but you get type checking, it doesn't bundle the `.d.ts` files.\n- Use [`rollup-plugin-dts`](https://github.com/Swatinem/rollup-plugin-dts) which generates and bundle `.d.ts`, also does type checking.\n- Use [`api-extractor`](https://api-extractor.com/) by Microsoft, looks quite complex to me so I didn't try it, PR welcome to update this section.\n\n### Use with Vue JSX\n\nUse this with [rollup-plugin-vue-jsx](https://github.com/xxholly32/rollup-plugin-vue-jsx):\n\n```js\nimport vueJsx from 'rollup-plugin-vue-jsx-compat'\nimport esbuild from 'rollup-plugin-esbuild'\n\nexport default {\n  // ...\n  plugins: [\n    vueJsx(),\n    esbuild({\n      jsxFactory: \"vueJsxCompat\",\n    }),\n  ],\n}\n```\n\n## License\n\nMIT &copy; [EGOIST (Kevin Titor)](https://github.com/sponsors/egoist)\n","readmeFilename":"README.md"}