Gathering detailed insights and metrics for babelrc-rollup
Gathering detailed insights and metrics for babelrc-rollup
Gathering detailed insights and metrics for babelrc-rollup
Gathering detailed insights and metrics for babelrc-rollup
npm install babelrc-rollup
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
13 Stars
13 Commits
5 Forks
3 Watching
2 Branches
1 Contributors
Updated on 28 Jan 2023
JavaScript (95.37%)
Shell (4.63%)
Cumulative downloads
Total Downloads
Last day
-1%
2,122
Compared to previous day
Last week
-14%
14,685
Compared to previous week
Last month
349.2%
41,455
Compared to previous month
Last year
80.4%
79,501
Compared to previous year
1
14
Builds a babel configuration for rollup-plugin-babel by reading .babelrc.
$ npm install --save-dev babelrc-rollup
Create a .babelrc
file at the root of your project as normal:
1{ 2 "presets": ["es2015"] 3}
Inside your rollup.config.js
, do this:
1import babelrc from 'babelrc-rollup'; 2import babel from 'rollup-plugin-babel'; 3 4export default { 5 … 6 plugins: [ 7 babel(babelrc()) 8 ] 9 … 10};
path
(default: '.babelrc'
)If you'd like to customize the path of your babelrc file, pass this option with
a string path that can be read using fs.readFile
.
config
Use this to avoid reading a babelrc file at all. You could use this to pull the
config from package.json
instead, for example.
addModuleOptions
(default: true
)Disable this option if you do not want the modules: false
option to be given
to presets in your babel config. You probably don't want to change this unless
you're using findRollupPresets
.
findRollupPresets
(default: false
)Enable this to replace presets with the equivalent rollup-compatible preset, if
available. When this option is enabled, babelrc-rollup will try to resolve e.g.
es2015-rollup
instead of es2015
. If no such preset can be found the original
will be used.
addExternalHelpersPlugin
(default: true
)By default, babelrc-rollup adds the external-helpers
plugin,
which ensures that only one copy of each helper ends up in your bundle. Disable
this option to prevent adding this plugin.
Since babel v6.13.0, presets may be given options by using a tuple of
[name, opts]
. For example, instead of
1{ 2 "presets": ["es2015"] 3}
You can do this:
1{ 2 "presets": [ 3 ["es2015", { "modules": false }] 4 ] 5}
babelrc-rollup is meant to work with this version of babel or later, but earlier
versions are supported by using the right options. The old way to configure the
es2015
preset for use with rollup was to use the es2015-rollup
preset
instead. To continue doing that, call babelrc
like so:
1babelrc({ 2 addModuleOptions: false, 3 findRollupPresets: true, 4 addExternalHelpersPlugin: false 5})
If you use the es2015
preset, make sure you install es2015-rollup
too. If
you can use babel v6.13.0 or later, you should do so.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
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