
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
babel-preset-modern-node
Advanced tools
Babel preset for building modern node apps with the least amount of transformations as possible.
npm install --save-dev babel-preset-modern-node
Simply use this preset as any other. Following options can be passed to
configure babel-preset-modern-node
to your taste:
false
)
loose = true|false
commonjs
)
modules = (false|commonjs|amd|umd|systemjs)
process.versions.node
)
version = "5.10.2"
.babelrc
(recommended){
"presets": ["modern-node"]
}
Or:
{
"presets": [["modern-node", { "loose": true, ... }]]
}
babel script.js --presets modern-node
require('babel-core').transform('code', {
presets: ['modern-node'],
})
Or:
require('babel-core').transform('code', {
presets: [['modern-node', { "loose": true, ... }]],
})
This preset currently supports ES2015 and ES2016 support for all minor node
versions starting at v0.12
.
Array.includes
This preset does not modify the global space / prototypes! Due to this we're
not able to fully support ES2016's Array.includes
see here for more details.
package.json
the super global __VERSION__
will be set accordingly
foo.default
becomes foo["default"]
default: "bar"
becomes "default": "bar"
FAQs
Babel preset for modern node apps
We found that babel-preset-modern-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.