Gathering detailed insights and metrics for rollup-plugin-esbuild
Gathering detailed insights and metrics for rollup-plugin-esbuild
Gathering detailed insights and metrics for rollup-plugin-esbuild
Gathering detailed insights and metrics for rollup-plugin-esbuild
rollup-plugin-vue-jsx-compat
work with [rollup-plugin-esbuild](https://github.com/egoist/rollup-plugin-esbuild), and just for vue-jsx
bob-esbuild-plugin
bob-esbuild main plugin, based on https://github.com/egoist/rollup-plugin-esbuild
rollup-plugin-esbuild-minify
Rollup plugin to minify or clean up generated bundles using esbuild.
@sentry/bundler-plugin-core
Sentry Bundler Plugin Core
Use ESBuild with Rollup to transform ESNext and TypeScript code.
npm install rollup-plugin-esbuild
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
631 Stars
278 Commits
41 Forks
8 Watching
10 Branches
29 Contributors
Updated on 25 Nov 2024
TypeScript (95.89%)
JavaScript (3.78%)
Shell (0.33%)
Cumulative downloads
Total Downloads
Last day
7.9%
43,903
Compared to previous day
Last week
2.4%
222,253
Compared to previous week
Last month
11.9%
936,033
Compared to previous month
Last year
45%
8,572,733
Compared to previous year
4
💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.
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.
1yarn add esbuild rollup-plugin-esbuild --dev
In rollup.config.js
:
1import esbuild from 'rollup-plugin-esbuild' 2 3export default { 4 plugins: [ 5 esbuild({ 6 // All options are optional 7 include: /\.[jt]sx?$/, // default, inferred from `loaders` option 8 exclude: /node_modules/, // default 9 sourceMap: true, // default 10 minify: process.env.NODE_ENV === 'production', 11 target: 'es2017', // default, or 'es20XX', 'esnext' 12 jsx: 'transform', // default, or 'preserve' 13 jsxFactory: 'React.createElement', 14 jsxFragment: 'React.Fragment', 15 // Like @rollup/plugin-replace 16 define: { 17 __VERSION__: '"x.y.z"', 18 }, 19 tsconfig: 'tsconfig.json', // default 20 // Add extra loaders 21 loaders: { 22 // Add .json files support 23 // require @rollup/plugin-commonjs 24 '.json': 'json', 25 // Enable JSX in .js files too 26 '.js': 'jsx', 27 }, 28 }), 29 ], 30}
include
and exclude
can be String | RegExp | Array[...String|RegExp]
, when supplied it will override default values.jsx
, jsxDev
, jsxFactory
, jsxFragmentFactory
and target
options from your tsconfig.json
as default values.There are serveral ways to generate declaration file:
tsc
with emitDeclarationOnly
, the slowest way but you get type checking, it doesn't bundle the .d.ts
files.rollup-plugin-dts
which generates and bundle .d.ts
, also does type checking.api-extractor
by Microsoft, looks quite complex to me so I didn't try it, PR welcome to update this section.Use this with rollup-plugin-vue-jsx:
1import vueJsx from 'rollup-plugin-vue-jsx-compat' 2import esbuild from 'rollup-plugin-esbuild' 3 4export default { 5 // ... 6 plugins: [ 7 vueJsx(), 8 esbuild({ 9 jsxFactory: 'vueJsxCompat', 10 }), 11 ], 12}
If you only want to use this plugin to minify your bundle:
1import { minify } from 'rollup-plugin-esbuild' 2 3export default { 4 plugins: [minify()], 5}
You can use this plugin to pre-bundle dependencies using esbuild and inline them in the Rollup-generated bundle:
1esbuild({ 2 optimizeDeps: { 3 include: ['vue', 'vue-router'], 4 }, 5})
This eliminates the need of @rollup/plugin-node-modules
and @rollup/plugin-commonjs
.
Note that this is an experimental features, breaking changes might happen across minor version bump.
TODO: Maybe we can scan Rollup input files to get a list of deps to optimize automatically.
MIT © EGOIST (Kevin Titor)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
Found 6/25 approved changesets -- score normalized to 2
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More