Registry / devops / babel-preset-blueflag

babel-preset-blueflag

JSON →
library1.0.1jsnpmunverified

A Babel preset encapsulating Blue Flag's opinionated configuration for transpiling JavaScript. Version 1.0.1, seems to be a single release. It automatically uses babel-preset-env to target either the last 2 browser versions or current Node.js, and includes plugins for runtime, class properties, stage-3, and React. Configuration options allow disabling specific plugins/presets and passing custom options to child presets. No updates since initial release, likely stable/small user base.

npm install babel-preset-blueflag
INSTALL
IMPORT
SIG · BABEL-PRESET-BLUEF
B
babel-preset-blueflag
devopsjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

babel-preset-blueflag
{ presets: ['blueflag'] }
{ presets: ['babel-preset-blueflag'] }
Use the shorthand 'blueflag' in Babel config.
default config
module.exports = { presets: [['blueflag', { browser: true }]] }
module.exports = { presets: ['blueflag', { browser: true }] }
Options must be in an array: ['blueflag', options].
disabled plugins
['blueflag', { disabled: ['react'] }]
['blueflag', { disabled: ['babel-preset-react'] }]
Prefixes like 'babel-preset-' or 'babel-plugin-' are omitted in the disabled list.

Shows how to install and configure babel-preset-blueflag with browser targeting, disabled array, and custom env targets.

// Install: npm install --save babel-preset-blueflag // In .babelrc or babel.config.js: module.exports = { presets: [ ['blueflag', { browser: process.env.BROWSER === 'true', disabled: [], config: { env: { targets: { browsers: '> 1%' } } } }] ] };
Debug
Known issues
deprecatedbabel-preset-stage-3 is deprecated in Babel 7+
fix
Replace with individual plugins or @babel/preset-env with proposals.
affects: >=1.0
gotchaOption 'library' currently does nothing
fix
Ignore or remove 'library' configuration until implemented.
affects: 1.0.1
gotchaDisabled array requires plugin/preset names without prefix
fix
Use 'react', not 'babel-preset-react'.
affects: >=1.0
Errors
Common errors & fixes
Error: Plugin/Preset files are not allowed to export objects, only functions.
Using an outdated Babel version that expects function presets.
fix
Upgrade to Babel 7+ or ensure preset is loaded correctly.
Module not found: Error: Can't resolve 'babel-preset-env'
babel-preset-env is not installed as a direct dependency when using npm v7+ with auto-peer-deps off.
fix
Run npm install babel-preset-env --save-dev.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
babel-preset-envrequiredCore preset for environment-based transpilation
babel-plugin-transform-runtimerequiredRuntime transform plugin
babel-plugin-transform-class-propertiesrequiredClass properties transform
babel-preset-reactrequiredReact JSX and display name transforms
babel-preset-stage-3requiredStage 3 proposal transforms
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
babel-preset-blueflag — npm install babel-preset-blueflag · libregistry