Configure options below — the preview updates in real time.

Presets

Preset collections to activate. Presets are shareable sets of Babel plugins and configuration.

An array of presets to activate during compilation. Each preset is a collection of plugins.

Plugins

Individual transformation plugins to activate during compilation.

An array of plugins to activate. Plugins perform specific code transformations.

Config Loading

Options that control how Babel resolves and loads configuration files.

Defines how Babel chooses its project root. 'upward' is useful for monorepos.

The current active environment used to resolve env-specific configuration keys.

Enable .babelrcEnables or disables the loading of .babelrc and .babelignore files.

Additional packages/directories to consider as root when loading .babelrc files.

Explicit path to the project-wide config file, or leave empty for auto-detection.

A path to another Babel configuration file to inherit settings from.

Environment Targets

Define which platforms and browsers your code needs to support.

Browserslist-compatible query string or object describing target environments.

Use Browserslist ConfigWhether to search for and use .browserslistrc files or the browserslist key in package.json.

The environment name to pass to Browserslist to resolve the target query.

Source Maps

Control generation and configuration of source maps.

Controls generation of source maps. 'inline' appends as data URI, 'both' returns map and appends comment.

Input Source MapAttempt to load an input source map from the file itself. Set to false to skip input source map loading.

Sets the file name used in the sources[0] array of the returned source map.

The root path from which all source maps are resolved relative to.

Output Formatting

Control how Babel formats the generated output code.

Retain LinesRetain line numbers during transformation. Leads to unusual formatting but preserves line mappings.

Omit superfluous whitespace. 'auto' enables for files exceeding 500KB.

MinifiedOutput the most minified code possible (implies compact: true).
CommentsInclude comments in the output code.

A comment string attached before all non-user injected code (Babel helpers).

A comment string attached after all non-user injected code.

Source Type & Parsing

Configure how Babel parses the source code.

How the code should be parsed. 'unambiguous' guesses based on import/export presence.

Set assumptions Babel can make about your code to produce smaller output (e.g. noDocumentAll, iterableIsArray, setPublicClassFields).

Highlight CodeOutput ANSI-highlighted code snippets in syntax error messages.
Generate CodeIf false, Babel will not invoke the code generator (saves time when only the AST is needed).
Include ASTInclude the Abstract Syntax Tree in the returned response.
Clone Input ASTClone the AST to avoid mutating the original. Disable for performance if input AST is not reused.

Module ID Options

AMD / UMD / SystemJS module configuration for explicit module IDs.

Module IDsEnable explicit module ID generation for AMD/UMD modules. Defaults to true if moduleId is set.

Specify a custom name for the module ID to be injected.

A prefix appended to the AMD module formatter filename on module definitions.

File Filtering

Control which files Babel processes or ignores.

A file must match this condition to be compiled by Babel.

Synonym for test. Limits execution to matched paths.

Files matching this condition are skipped by Babel entirely.

Array of conditions. If a file matches, Babel discards the compilation entirely.

If specified, Babel will ONLY compile files that match these conditions.

Advanced Options

Advanced compilation and behavior settings.

Pass Per Preset (Deprecated)Deprecated. Run each preset's pass one after another instead of merging them into a single pass.

The filename associated with the code being compiled. Used by plugins and source map generators.

Filename relative to sourceRoot.

The working directory that all paths in programmatic options will be resolved relative to.

The initial path for processing, used as the base for project-wide configurations.