babelrc.json
Babel configuration file
| Type | object |
|---|---|
| File match |
.babelrc
.babelrc.json
babel.config.json
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/babelrc-json/latest.json |
| Source | https://www.schemastore.org/babelrc.json |
Validate with Lintel
npx @lintel/lintel check
All of
Definitions
Include the AST in the returned object
Attach a comment after all non-user injected code.
Attach a comment before all non-user injected code.
Enable code generation
Output comments in generated output.
Do not include superfluous whitespace characters and line terminators. When set to "auto" compact is set to true on input sizes of >500KB.
A path to a .babelrc file to extend
Filename for use in errors etc.
Filename relative to sourceRoot (defaults to "filename")
ANSI highlight syntax error code frames
Opposite of the "only" option
If true, attempt to load an input sourcemap from the file itself. If an object is provided, it will be treated as the source map object itself.
Keep extensions in module ids
Specify a custom name for module ids.
If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for common modules)
Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. (defaults to "sourceRoot")
A glob, regex, or mixed array of both, matching paths to only compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim.
List of plugins to load and use
List of presets (a set of plugins) to load and use
Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. NOTE: This will obviously not retain the columns.
Set sources[0] on returned source map. (defaults to "filenameRelative")
If truthy, adds a map property to returned output. If set to "inline", a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to "both" then a map property is returned as well as a source map comment appended.
Set file on returned source map. (defaults to "filenameRelative")
The root from which all sources are relative. (defaults to "moduleRoot")