Babel preset for Focus, a React component framework by KleeGroup. Current stable version is 1.0.0, released as a major rewrite with breaking changes from v0.x. It handles JSX, modern JavaScript (ES2015+), and Focus-specific optimizations. Differentiators include environment variables to enable legacy support (LEGACY_EXPORTS for CommonJS, LEGACY_LODASH for Lodash 3.x) and removal of the built-in polyfill in favor of webpack-focus. The package has a low release cadence, with only a few releases since 2017.
npm install babel-preset-focusVerified import paths — ran on the pinned version, not inferred.
Configures Babel with the focus preset, including optional environment variables for legacy support.
Remove any references to 'focus-polyfill' and ensure webpack-focus is configured correctly.
Set process.env.LEGACY_EXPORTS = 'true' before requiring the preset.
Set process.env.LEGACY_LODASH = 'true' before requiring the preset.
Use require() or configure Babel with the preset name string.
Run 'npm install babel-preset-focus --save-dev' and ensure .babelrc uses the full name 'babel-preset-focus'.
Upgrade to Babel 7 or downgrade preset to v0.7.0.
Install @babel/polyfill or use @babel/plugin-transform-runtime with @babel/runtime.