Babel Config Generator Prompt
Generate a version-compatible Babel configuration from supplied runtimes, syntax, targets, framework, test, bundler, module, and validation requirements.
Prompt Template
You are a senior JavaScript build-tooling engineer generating a Babel configuration only from the repository facts, installed versions, runtime targets, source syntax, module contract, framework, test runner, bundler, and validation evidence I provide. Produce the smallest maintainable configuration compatible with the exact Babel core, preset, and plugin versions. Treat JavaScript runtime support, browser targets, TypeScript syntax removal, JSX transformation, polyfills, module transformation, test transpilation, bundler ownership, monorepo boundaries, and framework-owned configuration as separate concerns. Never invent package versions, preset or plugin names, options, defaults, paths, targets, environment values, compatibility guarantees, or successful validation. Project purpose: [browser app, server app, library, test package, monorepo package, other] Sanitized repository tree and config location: [paste] Package manager and workspace setup: [details] Exact JavaScript runtime and @babel/core versions: [versions or unknown] Installed Babel presets and plugins with exact versions: [verified list] Package module mode and allowed config extensions: [ESM, CommonJS, mixed, unknown] Source syntax: [JavaScript version, JSX, TypeScript syntax, decorators, class features, other verified syntax] Runtime and browser targets with source of truth: [details] Framework, compiler, bundler, test runner, lint, and exact versions: [verified list] Which tool owns each transformation: [details or unknown] Existing Babel, browserslist, TypeScript, test, and bundler configuration: [paste sanitized content or none] Module output requirements by environment: [preserve, CommonJS, ESM, other] Polyfill and runtime-helper policy: [details] Monorepo root, package boundaries, overrides, ignores, and third-party transpilation needs: [details] Development, build, test, type-check, and CI commands: [details] Exact sanitized error or incompatible output: [paste] Security and privacy boundary: [no secrets, private registry tokens, proprietary source, customer data, or internal URLs] Validation available: [config inspection, transform fixture, tests, production build, output syntax check, deployment preview] Output scope: [root config, package config, environment overrides, migration notes] Provide: 1. An assumptions table marking every version, target, syntax feature, preset, plugin, option, module behavior, path, and owner as verified, inferred, or unknown. 2. A recommendation for babel.config, a package-relative config, framework-owned configuration, or no Babel config, justified by repository and monorepo facts. 3. Complete minimal config content using only installed or explicitly approved version-compatible presets and plugins, with placeholders for unresolved values. 4. A transformation ownership matrix showing what Babel, the TypeScript compiler, framework compiler, bundler, test runner, and runtime each handle, and where work would be duplicated. 5. An environment matrix for development, test, production, server, browser, and library output, including targets, modules, source maps, helpers, and polyfill boundaries. 6. A dependency review separating installed, required after verification, optional, redundant, obsolete, and incompatible packages. 7. A migration plan covering old configs, browserslist, test settings, build scripts, caches, generated output, CI, rollback, and contributor notes. 8. Version-appropriate commands for displaying the effective config, transforming a minimal fixture, running tests, building, inspecting output syntax and modules, and validating the deployment target. 9. A final audit for unsupported syntax, duplicate transforms, incorrect modules, broad overrides, third-party transpilation, helper duplication, polyfill bloat, source-map leakage, stale caches, secret exposure, and claims not backed by command output. Do not install packages, overwrite framework-owned configuration, transpile dependencies broadly without evidence, expose private source or tokens, or claim the config works without running validation. Ask for missing versions and errors or leave explicit placeholders rather than guessing.
Example Output
Verified Inputs
The supplied package has exact JavaScript runtime and Babel core versions, a known browser target file, JavaScript plus JSX source, one installed preset, and a bundler that owns minification. TypeScript, decorators, polyfills, server output, monorepo overrides, and third-party transpilation remain unverified.
Recommended Shape
Use one root Babel config only if the supplied workspace and toolchain require it. Preserve modules for the verified bundler, apply the installed preset to the confirmed targets, and omit TypeScript, decorators, runtime helpers, polyfills, test overrides, and dependency transforms until their versions and owners are demonstrated.
Validation Boundary
Print the effective config for a fixture, transform representative syntax, run tests and the production build, inspect output modules and target syntax, clear relevant caches, and verify the deployment preview. A successful config parse alone does not prove runtime compatibility.
Tips for Best Results
- ๐กProvide exact Babel core, preset, plugin, runtime, framework, bundler, test-runner, and TypeScript versions.
- ๐กAssign every syntax, module, helper, and polyfill transformation to one owner to avoid duplicate work.
- ๐กValidate the effective config, representative syntax, module output, tests, production build, and actual deployment target.
Frequently Asked Questions
What is the Babel Config Generator Prompt prompt?
Generate a version-compatible Babel configuration from supplied runtimes, syntax, targets, framework, test, bundler, module, and validation requirements. It's a free ChatGPT prompt template from our Coding collection โ copy it, fill in the bracketed variables, and paste it into your AI tool.
Which AI tools work with this prompt?
It's written and tested for ChatGPT, Claude and Gemini. Any AI assistant that accepts free-form text prompts will handle it well.
How do I customize this ChatGPT prompt?
Replace the bracketed variables โ such as [paste], [details], [versions or unknown] โ with your own details before running it. Provide exact Babel core, preset, plugin, runtime, framework, bundler, test-runner, and TypeScript versions.
Is this prompt free to use?
Yes. Every prompt on PromptAtlas is free to copy, customize, and use โ no signup required.
Related Prompts
Code Review Assistant
Get a thorough, senior-level code review with actionable feedback on quality, security, performance, and best practices.
Debugging Detective
Systematically debug errors and unexpected behavior with root cause analysis and fix suggestions.
Code Refactoring Advisor
Transform messy, complex code into clean, maintainable, well-structured code with clear explanations.