babel-config-builder
Generate Babel configuration files for JavaScript/TypeScript transpilation with presets and plugins. Triggers on "create babel config", "generate babel configuration", "babel setup", "transpilation config".
When & Why to Use This Skill
The Babel Config Builder is a specialized Claude skill designed to automate the creation of Babel configuration files (babel.config.js, .babelrc) for modern JavaScript and TypeScript projects. It streamlines the development workflow by automatically generating optimized configurations with essential presets like @babel/preset-env, @babel/preset-react, and @babel/preset-typescript, ensuring seamless code transpilation and cross-browser compatibility.
Use Cases
- Scenario 1: Rapidly setting up a new React and TypeScript project with standardized transpilation rules.
- Scenario 2: Configuring Node.js environments to support the latest ECMAScript features using the 'current' node target.
- Scenario 3: Migrating legacy JavaScript codebases to modern build systems by generating valid Babel 7 configurations.
- Scenario 4: Implementing performance optimizations by automatically adding essential plugins like @babel/plugin-transform-runtime.
| name | babel-config-builder |
|---|---|
| description | Generate Babel configuration files for JavaScript/TypeScript transpilation with presets and plugins. Triggers on "create babel config", "generate babel configuration", "babel setup", "transpilation config". |
Babel Config Builder
Generate Babel configuration files for JavaScript transpilation with appropriate presets and plugins.
Output Requirements
File Output: babel.config.js, babel.config.json, or .babelrc
Format: Valid Babel 7 configuration
Standards: Babel 7.x
When Invoked
Immediately generate a complete Babel configuration with presets for the target environment and necessary plugins.
Configuration Template
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
['@babel/preset-react', { runtime: 'automatic' }],
],
plugins: [
'@babel/plugin-transform-runtime',
],
};
Example Invocations
Prompt: "Create babel config for React TypeScript"
Output: Complete babel.config.js with React, TypeScript presets.