Registry / web-framework / babel-preset-kyt-react

babel-preset-kyt-react

JSON →
library1.3.20jsnpmunverified

An opinionated Babel preset for React applications, intended to be used with the kyt build tool from The New York Times. Version 1.3.20 is the latest stable release, part of the kyt monorepo. It provides a preconfigured Babel setup for React with support for common modern JavaScript features. Unlike generic presets like @babel/preset-react, this preset is tailored for kyt's specific project structure and includes its own set of plugins. The package has low release cadence, primarily receiving version bumps alongside other kyt packages. Key differentiator is its seamless integration with the kyt build system, which handles configuration for Webpack, Babel, and ESLint.

npm install babel-preset-kyt-react
INSTALL
IMPORT
SIG · BABEL-PRESET-KYT-R
B
babel-preset-kyt-react
web-frameworkjavascriptv1.3.20
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.

default (preset)
module.exports = { presets: ['kyt-react'] }
module.exports = { presets: ['babel-preset-kyt-react'] }
Preset name is 'kyt-react' in babel config; the full package name also works but shorter is documented.
babel-preset-kyt-react
module.exports = { presets: ['babel-preset-kyt-react'] }
import { preset } from 'babel-preset-kyt-react'
This is a Babel preset, not exported as a JavaScript module; use in babel.config.js or .babelrc.
module.exports
module.exports = { presets: [['kyt-react', { runtime: 'automatic' }]] }
export default { presets: ['kyt-react'] }
Uses CommonJS module.exports; ESM export is not supported in Babel config files.

Shows basic setup of the preset in a babel configuration file, assuming kyt is used as the build tool.

// Install with kyt: npm install kyt babel-preset-kyt-react@1.3.20 // In babel.config.js: module.exports = { presets: [ ['kyt-react', { runtime: 'automatic' // optional, for React 17+ JSX transform }] ] } // Then run: npx kyt build
Debug
Known issues
deprecatedPlugin @babel/plugin-proposal-class-properties is deprecated as of Babel 8
fix
Upgrade Babel to v8 and switch to @babel/plugin-transform-class-properties or remove if using preset-env with shippedProposals.
affects: >=1.3.20
gotchaPreset name must be 'kyt-react' not 'babel-preset-kyt-react' when using kyt framework's default config resolution
fix
Use 'kyt-react' as preset name in babel config when using kyt.
affects: >=1.0.0
gotchaThis preset is tightly coupled with kyt; using it standalone without kyt may cause unexpected behavior
fix
Ensure you are using the kyt build tool or manually configure missing plugins.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'babel-preset-kyt-react'
Package not installed or incorrect import path in babel config
fix
Run 'npm install babel-preset-kyt-react' and use presets: ['kyt-react'] or presets: ['babel-preset-kyt-react']
Error: Plugin/Preset files are not allowed to export objects, only functions.
Multiple copies of Babel or incorrect version mismatch
fix
Ensure @babel/core is installed and version matches; use 'npm dedupe' or reinstall dependencies
ReferenceError: regeneratorRuntime is not defined
Missing @babel/plugin-transform-runtime or @babel/runtime
fix
Add '@babel/plugin-transform-runtime' to plugins and install @babel/runtime as a dependency
Upgrade
Version history
1.3.20latest on npm
Audit
Dependencies
@babel/corerequiredBabel core is required to process transformations
@babel/preset-envrequiredPreset-env for compiling modern JavaScript
@babel/preset-reactrequiredPreset-react for JSX and React-specific transforms
babel-plugin-add-module-exportsrequiredPlugin to add module.exports for CommonJS compatibility
@babel/plugin-proposal-class-propertiesrequiredPlugin for class properties syntax
@babel/plugin-syntax-dynamic-importrequiredPlugin for dynamic import() syntax
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
babel-preset-kyt-react — npm install babel-preset-kyt-react · libregistry