
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
babel-preset-es2015-maybe-webpack
Advanced tools
An es2015 preset that can dynamically exclude the ES6 module plugin based on env.
Using Webpack2 with Babel is difficult. Webpack >= 2 understands ES6 import/export
natively, so you don't want
to use the full babel-preset-es2015. You want to have all of your babel options in your .babelrc
, but there
is no good way to override a single preset in babel-loader
while keeping the rest of your .babelrc
intact,
including env
s.
This preset is for you if you've already tried to parse your .babelrc
yourself (hint, use json5
).
Add the following to the top of your webpack config:
process.env.WEBPACK_VERSION = require('webpack/package.json').version;
If this preset detects that Webpack >= 2 is being used, it will exclude transform-es2015-modules-commonjs
.
Install both this preset, and the core 'babel-preset-es2015' that it modifies:
$ npm install --save-dev babel-preset-es2015-maybe-webpack babel-preset-es2015
Hint: You can get [loose] mode by using es2015-maybe-webpack/loose
.
.babelrc
(Recommended).babelrc
{
"presets": ["es2015-maybe-webpack"]
}
$ babel script.js --presets es2015-maybe-webpack
require("babel-core").transform("code", {
presets: ["es2015-maybe-webpack"]
})
FAQs
An es2015 preset that can dynamically exclude the ES6 module plugin based on env.
The npm package babel-preset-es2015-maybe-webpack receives a total of 4 weekly downloads. As such, babel-preset-es2015-maybe-webpack popularity was classified as not popular.
We found that babel-preset-es2015-maybe-webpack 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.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.