-- -Following is a table of the options you can use: - -| Option | Default | Description | -| ------------------------ | -------------------- | ------------------------------- | -| `ast` | `false` | Include the AST in the returned object | -| `auxiliaryCommentAfter` | `null` | Attach a comment after all non-user injected code | -| `auxiliaryCommentBefore` | `null` | Attach a comment before all non-user injected code | -| `root` | `"."` | Specify the "root" folder that defines the location to search for "babel.config.js", and the default folder to allow `.babelrc` files inside of.| -| `configFile` | `undefined` | The config file to load Babel's config from. Defaults to searching for "babel.config.js" inside the "root" folder. `false` will disable searching for config files.| -| `babelrc` | `true` | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc) | -| `babelrcRoots` | `(root)` | Specify which packages should be search for .babelrc files when they are being compiled. `true` to _always_ search, or a path string or an array of paths to packages to search inside of. Defaults to only searching the "root" package. | -| `envName` | env vars | Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"` | -| `code` | `true` | Enable code generation | -| `comments` | `true` | Output comments in generated output | -| `compact` | `"auto"` | Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB | -| `cwd` | `.` | The working directory that Babel's programmatic options are loaded relative to. | -| `env` | `{}` | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the `envName` is `production` | -| `extends` | `null` | A path to a `.babelrc` file to extend | -| `filename` | `"unknown"` | Filename for use in errors, babel config lookup, etc | -| `filenameRelative` | `(filename)` | Filename relative to `sourceRoot` | -| `generatorOpts` | `{}` | An object containing the options to be passed down to the babel code generator, @babel/generator | -| `getModuleId` | `null` | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used | -| `highlightCode` | `true` | ANSI highlight syntax error code frames | -| `ignore` | `null` | Opposite to the `only` option. `ignore` is disregarded if `only` is specified | -| `inputSourceMap` | `null` | A source map object that the output source map will be based on | -| `minified` | `false` | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) | -| `moduleId` | `null` | Specify a custom name for module ids | -| `moduleIds` | `false` | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) | -| `moduleRoot` | `(sourceRoot)` | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions | -| `only` | `null` | A [glob](https://github.com/isaacs/minimatch), 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 | -| `parserOpts` | `{}` | An object containing the options to be passed down to the babel parser, @babel/parser | -| `plugins` | `[]` | List of [plugins](https://babeljs.io/docs/plugins/) to load and use | -| `presets` | `[]` | List of [presets](https://babeljs.io/docs/plugins/#presets) (a set of plugins) to load and use | -| `retainLines` | `false` | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) | -| `shouldPrintComment` | `null` | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used | -| `sourceFileName` | `(filenameRelative)` | Set `sources[0]` on returned source map | -| `sourceMaps` | `false` | 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. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option | -| `sourceRoot` | `(moduleRoot)` | The root from which all sources are relative | -| `sourceType` | `"module"` | Indicate the mode the code should be parsed in. Can be one of "script", "module", or "unambiguous". `"unambiguous"` will make Babel attempt to _guess_, based on the presence of ES6 `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`. | -| `wrapPluginVisitorMethod`| `null` | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`. - +See [the full option list here](options.md). diff --git a/docs/env.md b/docs/env.md index 0cfa537a49..ffcfe93cc2 100644 --- a/docs/env.md +++ b/docs/env.md @@ -18,7 +18,7 @@ You might end up on this page because you saw a message in the terminal like thi Before you proceed further, ask yourself: are you *using* Babel? Check your `package.json` and look for `babel-preset-es2015` or a similar preset there. If you see a preset like this in your `package.json`, read on! -If you don't use Babel or don't use deprecated yearly presets, you probably saw this message because *another package* you depend on uses them. **In that case there's nothing *you* need to do**. Nevertheless, it might be a good idea to find out which package uses the deprecated presets, and help them migrate by sending a pull request. You can find this out by running `npm ls babel-preset-es2015` which will show the dependency tree. +If you don't use Babel or don't use deprecated yearly presets, you probably saw this message because *another package* you depend on uses them. **In that case there's nothing *you* need to do**. Nevertheless, it might be a good idea to find out which package uses the deprecated presets, and help them migrate by sending a pull request. You can find this out by running `npm ls babel-preset-es2015` which will show the dependency tree. ## Upgrading to `babel-preset-env` @@ -27,7 +27,7 @@ If you don't use Babel or don't use deprecated yearly presets, you probably saw ```sh npm install babel-preset-env --save-dev ``` -#### Basic `.babelrc` change +#### Basic [options](options.md) change ```diff { @@ -36,7 +36,7 @@ npm install babel-preset-env --save-dev } ``` -#### `.babelrc` change with options +#### [options](options.md) change with preset options ```diff { @@ -58,7 +58,7 @@ npm install babel-preset-env --save-dev ## By targeting specific browsers, Babel can do less work so you can ship native ES2015+ 😎! -#### `.babelrc` against a specific chrome version +#### [options](options.md) against a specific chrome version ```json { @@ -72,7 +72,7 @@ npm install babel-preset-env --save-dev } ``` -#### `.babelrc` against current node version +#### [options](options.md) against current node version ```json { diff --git a/docs/faq.md b/docs/faq.md index 0e0a354561..d683a3cc3a 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -56,7 +56,7 @@ We hear you! Babel 6 requires a tiny bit of configuration in order to get going. ## Upgrading from Babel 5.x to Babel 6 At the heart of Babel 6 are [plugins](plugins.md). What plugins you need completely -depends on your specific configuration but just add the following `.babelrc` file to +depends on your specific configuration but just add the following [config file](config-files.md) to get all the same transforms that were in Babel 5: ```json diff --git a/docs/options.md b/docs/options.md new file mode 100644 index 0000000000..60c4d16732 --- /dev/null +++ b/docs/options.md @@ -0,0 +1,766 @@ +--- +title: Options +id: options +--- + +- [Primary options](#primary-options) +- [Config Loading options](#config-loading-options) +- [Plugin and Preset configuration](#plugin-and-preset-options) +- [Config Merging options](#config-merging-options) +- [Source Map options](#source-map-options) +- [Misc options](#misc-options) +- [Code Generator options](#code-generator-options) +- [AMD / UMD / SystemJS options](#amd-umd-systemjs-module-options) +- [Option concepts](#options-concepts) + +Options can be passed be passed to Babel in a variety of ways. When directly to Babel, +you can just pass the objects object. When Babel is used via a wrapper, it may also be +necessary, or at least more useful, to pass the options via [configuration files](config-files.md). + +## Primary options + +These options are only allowed as part of Babel's programmatic options, so +they are primarily for use by tools that wrap around Babel, or people calling +`babel.transform` directly. Users of Babel's integrations, like `babel-loader` +or [`@babel/register`](core.md#options) are unlikely to use these. + + +### `cwd` + +Type: `string`Babel CLI
-- You can pass these options from the Babel CLI like so: -
--
-babel --option-name=value
-
Example
-With Babel 7's .babelrc.js support, you can force all transforms to be run if env is set to `production`.
+With Babel 7's [Javascipt config file](config-files#javascript) support, you can force all transforms to be run if env is set to `production`.
```js
-module.exports = {
- presets: [
- [
- "@babel/preset-env",
- {
- targets: {
- chrome: 59,
- edge: 13,
- firefox: 50,
+module.exports = function(api) {
+ return {
+ presets: [
+ [
+ "@babel/preset-env",
+ {
+ targets: {
+ chrome: 59,
+ edge: 13,
+ firefox: 50,
+ },
+ // for uglifyjs...
+ forceAllTransforms: api.env("production"),
},
- // for uglifyjs...
- forceAllTransforms: process.env === "production",
- },
+ ],
],
- ],
+ };
};
```
diff --git a/docs/preset-react.md b/docs/preset-react.md
index c6a7ebb74a..8c176b3915 100644
--- a/docs/preset-react.md
+++ b/docs/preset-react.md
@@ -93,7 +93,7 @@ Will use the native built-in instead of trying to polyfill behavior for any plug
Toggles plugins that aid in development, such as [`@babel/plugin-transform-react-jsx-self`](https://babeljs.io/docs/plugins/transform-react-jsx-self/) and [`@babel/plugin-transform-react-jsx-source`](https://babeljs.io/docs/plugins/transform-react-jsx-source/).
-This is useful when combined with either a `babelrc.js` or [env option in a .babelrc](https://babeljs.io/docs/usage/babelrc/#env-option) configuration:
+This is useful when combined with the [env option](options.md#env) configuration or [js config files](config-files.md#javascript).
### `throwIfNamespace`
diff --git a/docs/presets.md b/docs/presets.md
index e62a28e09c..6a840c5ac8 100644
--- a/docs/presets.md
+++ b/docs/presets.md
@@ -3,7 +3,7 @@ id: presets
title: Presets
---
-Don't want to assemble your own set of plugins? No problem! Presets can act as an array of Babel plugins or even a sharable [`.babelrc`](babelrc.md) config.
+Don't want to assemble your own set of plugins? No problem! Presets can act as an array of Babel plugins or even a sharable [`options`](options.md) config.
## Official Presets
@@ -79,7 +79,7 @@ For more info, check out the [babel handbook](https://github.com/thejameskyle/ba
If the preset is on npm, you can pass in the name of the preset and babel will check that it's installed in `node_modules`
```json
-{
+{
"presets": ["babel-preset-myPreset"]
}
```
@@ -161,4 +161,4 @@ To specify an option, pass an object with the keys as the option names.
}]
]
}
-```
\ No newline at end of file
+```
diff --git a/docs/register.md b/docs/register.md
index 2118be2caa..b2787593fd 100644
--- a/docs/register.md
+++ b/docs/register.md
@@ -74,9 +74,10 @@ require("@babel/register")({
});
```
-You can pass in all other [options](https://babeljs.io/docs/usage/api/#options) as well,
-including `plugins` and `presets`. But note that the closest [`.babelrc`](https://babeljs.io/docs/usage/babelrc/)
-to each file still applies, and takes precedence over any options you pass in here.
+You can pass in all other [options](options.md) as well, including `plugins` and `presets`.
+Note that [config files](config-files.md) will also be loaded and the programmatic
+config will be merged over top of the file config options.
+
## Environment variables
diff --git a/docs/roadmap.md b/docs/roadmap.md
index 4234c137ba..8692ebe67f 100644
--- a/docs/roadmap.md
+++ b/docs/roadmap.md
@@ -15,7 +15,7 @@ Mentioned these in [babel/notes](https://github.com/babel/notes/blob/master/2017
### Remake `compat-table` used in preset-env
> https://github.com/kangax/compat-table could use a remake, ideally work with browser vendors on this
-
+
- There is also https://github.com/mdn/browser-compat-data
- Also use data from test262?
- Run tests against real browsers
@@ -78,7 +78,7 @@ Mentioned these in [babel/notes](https://github.com/babel/notes/blob/master/2017
- Use [six-speed](https://github.com/kpdecker/six-speed) repo as a base, needs to apply for ES6 and proposals
- Need continued maintainence
-### Compiled Output Stats
+### Compiled Output Stats
> [#5340](https://github.com/babel/babel/issues/5340) Can show the code size before and after compiling to give a sense of compiled output. Could create suggestions like using "loose" mode or not compiling, etc.
@@ -133,7 +133,7 @@ Better set of tests for stability/spec compliancy.
- Create/expand on new tools like https://github.com/boopathi/babel-time-travel
### Speed
-
+
> Already working with v8 via https://github.com/v8/web-tooling-benchmark, but can add other representative workloads: jsx/flow/ts/es6+.
Can run these benchmarks for perf PRs, should track some over time.
@@ -157,7 +157,7 @@ Can run these benchmarks for perf PRs, should track some over time.
- Import any package from npm (can give test examples for 3rd party plugins, debugging issues)
- Run any plugin from npm
- Create a plugin from the repl (can we merge it with ASTExplorer/codesandbox?), even publish, run from URL?
-- Import/Export a `.babelrc` file
+- Import/Export a config file
- Combine ^ with the ability to run the version of Babel in a PR/master.
- Use plugin's tests in the repo as "examples" for docs.
diff --git a/docs/standalone.md b/docs/standalone.md
index ae62ace821..b282f3407c 100644
--- a/docs/standalone.md
+++ b/docs/standalone.md
@@ -57,7 +57,7 @@ Loading external scripts via `src` attribute is supported too:
```
-Note that `.babelrc` doesn't work in @babel/standalone, as no file system access is available. The presets and/or plugins to use **must** be specified in the options passed to `Babel.transform`.
+Note that [config files](config-files.md) don't work in @babel/standalone, as no file system access is available. The presets and/or plugins to use **must** be specified in the options passed to `Babel.transform`.
Customisation
=============
diff --git a/docs/v7-migration-api.md b/docs/v7-migration-api.md
index b6f8b53db4..cccd094d4d 100644
--- a/docs/v7-migration-api.md
+++ b/docs/v7-migration-api.md
@@ -73,13 +73,13 @@ Included is a `root` option that defaults to the current working directory for i
It is also not loaded relatively so it will handle symlinking correctly, whereas before you may have had
hard-code the paths in webpack before.
-Check the `babel.config.js` docs for more info: https://babeljs.io/docs/en/next/babelconfigjs.html
+Check the `babel.config.js` docs for more info: [project-wide configuration](config-files.md#project-wide-configuration)
-This file combined with the new [`overrides`](https://babeljs.io/docs/en/next/babelrc.html#overrides) property and `env` lets you have a single config file
+This file combined with the new [`overrides`](options.md#overrides) property and `env` lets you have a single config file
that can work for all the files in a project vs. multiple config files per folder.
We also exclude `node_modules` by default and only look in the root unless you opt-in to setting
-an array of the `.babelrc` option such as `"babelrc": [".", "node_modules/pkgA"]`
+an array of the `.babelrcRoots` option such as `"babelrcRoots": [".", "node_modules/pkgA"]`
## Asserting Babel version [#7450](https://github.com/babel/babel/pull/7450)
diff --git a/docs/v7-migration.md b/docs/v7-migration.md
index fe59ff38f6..c2323767e6 100644
--- a/docs/v7-migration.md
+++ b/docs/v7-migration.md
@@ -227,7 +227,7 @@ If you were relying on Babel to inject `"use strict"` into all of your CommonJS
`babel-preset-react` has always included the flow plugin automatically from the beginning. This has actually caused a lot of issues with users that accidently use `flow` syntax without intending due to a typo, or adding it in without typechecking with `flow` itself, resulting in errors.
-This became further of an issue after we decided to support TypeScript with the help of the TS team. If you wanted to use the react and typescript presets, we would have to figure out a way to turn on/off the syntax automatically via file type or the directive. In the end it seemed easiest to just separate the presets entirely.
+This became further of an issue after we decided to support TypeScript with the help of the TS team. If you wanted to use the react and typescript presets, we would have to figure out a way to turn on/off the syntax automatically via file type or the directive. In the end it seemed easiest to just separate the presets entirely.
So now the react preset and the flow preset are separated.
@@ -329,7 +329,7 @@ npm install @babel/plugin-transform-runtime --save-dev
"plugins": [
- ["@babel/plugin-transform-runtime"],
+ ["@babel/plugin-transform-runtime", {
-+ "corejs": 2,
++ "corejs": 2,
+ }],
]
}
@@ -606,7 +606,7 @@ This change just makes babel-generator output `,` instead of `;`.
> Remove `babel-core/src/api/browser.js` [#5124](https://github.com/babel/babel/pull/5124) ![none](https://img.shields.io/badge/risk%20of%20breakage%3F-none-brightgreen.svg)
-`babel-browser` was already removed in 6.0. If you need to use Babel in the browser or a non-Node environment, use [babel-standalone](https://github.com/babel/babel-standalone).
+`babel-browser` was already removed in 6.0. If you need to use Babel in the browser or a non-Node environment, use [@babel/standalone](standalone.md).
Babel will return `filename` as an absolute path [#8044](https://github.com/babel/babel/pull/8044)
diff --git a/website/i18n/en.json b/website/i18n/en.json
index ae23e5a5a2..08f8d15a68 100644
--- a/website/i18n/en.json
+++ b/website/i18n/en.json
@@ -4,11 +4,10 @@
"next": "Next",
"previous": "Previous",
"tagline": "The compiler for next generation JavaScript",
- "babelconfigjs": "babel.config.js",
- "babelrc": ".babelrc",
"caveats": "Caveats",
"babel-cli": "babel-cli",
"babel-code-frame": "babel-code-frame",
+ "config-files": "Config Files",
"configuration": "Configure Babel",
"core-packages": "Babel's core packages",
"babel-core": "babel-core",
@@ -54,8 +53,9 @@
"learn": "Learn ES2015",
"babel-minify": "babel-minify",
"babel-node": "babel-node",
+ "options": "Options",
"babel-parser": "babel-parser",
- "babel-plugin-external-helpers": "babel-plugin-external-helpers",
+ "babel-plugin-external-helpers": "@babel/plugin-external-helpers",
"external-helpers": "external-helpers",
"babel-plugin-minify-builtins": "babel-plugin-minify-builtins",
"minify-builtins": "minify-builtins",
@@ -79,125 +79,125 @@
"minify-simplify": "minify-simplify",
"babel-plugin-minify-type-constructors": "babel-plugin-minify-type-constructors",
"minify-type-constructors": "minify-type-constructors",
- "babel-plugin-proposal-async-generator-functions": "babel-plugin-proposal-async-generator-functions",
+ "babel-plugin-proposal-async-generator-functions": "@babel/plugin-proposal-async-generator-functions",
"proposal-async-generator-functions": "proposal-async-generator-functions",
- "babel-plugin-proposal-class-properties": "babel-plugin-proposal-class-properties",
+ "babel-plugin-proposal-class-properties": "@babel/plugin-proposal-class-properties",
"proposal-class-properties": "proposal-class-properties",
- "babel-plugin-proposal-decorators": "babel-plugin-proposal-decorators",
+ "babel-plugin-proposal-decorators": "@babel/plugin-proposal-decorators",
"proposal-decorators": "proposal-decorators",
- "babel-plugin-proposal-do-expressions": "babel-plugin-proposal-do-expressions",
+ "babel-plugin-proposal-do-expressions": "@babel/plugin-proposal-do-expressions",
"proposal-do-expressions": "proposal-do-expressions",
- "babel-plugin-proposal-export-default-from": "babel-plugin-proposal-export-default-from",
+ "babel-plugin-proposal-export-default-from": "@babel/plugin-proposal-export-default-from",
"proposal-export-default-from": "proposal-export-default-from",
- "babel-plugin-proposal-export-namespace-from": "babel-plugin-proposal-export-namespace-from",
+ "babel-plugin-proposal-export-namespace-from": "@babel/plugin-proposal-export-namespace-from",
"proposal-export-namespace-from": "proposal-export-namespace-from",
- "babel-plugin-proposal-function-bind": "babel-plugin-proposal-function-bind",
+ "babel-plugin-proposal-function-bind": "@babel/plugin-proposal-function-bind",
"proposal-function-bind": "proposal-function-bind",
- "babel-plugin-proposal-function-sent": "babel-plugin-proposal-function-sent",
+ "babel-plugin-proposal-function-sent": "@babel/plugin-proposal-function-sent",
"proposal-function-sent": "proposal-function-sent",
- "babel-plugin-proposal-json-strings": "babel-plugin-proposal-json-strings",
+ "babel-plugin-proposal-json-strings": "@babel/plugin-proposal-json-strings",
"proposal-json-strings": "proposal-json-strings",
- "babel-plugin-proposal-logical-assignment-operators": "babel-plugin-proposal-logical-assignment-operators",
+ "babel-plugin-proposal-logical-assignment-operators": "@babel/plugin-proposal-logical-assignment-operators",
"proposal-logical-assignment-operators": "proposal-logical-assignment-operators",
- "babel-plugin-proposal-nullish-coalescing-operator": "babel-plugin-proposal-nullish-coalescing-operator",
+ "babel-plugin-proposal-nullish-coalescing-operator": "@babel/plugin-proposal-nullish-coalescing-operator",
"proposal-nullish-coalescing-operator": "proposal-nullish-coalescing-operator",
- "babel-plugin-proposal-numeric-separator": "babel-plugin-proposal-numeric-separator",
+ "babel-plugin-proposal-numeric-separator": "@babel/plugin-proposal-numeric-separator",
"proposal-numeric-separator": "proposal-numeric-separator",
- "babel-plugin-proposal-object-rest-spread": "babel-plugin-proposal-object-rest-spread",
+ "babel-plugin-proposal-object-rest-spread": "@babel/plugin-proposal-object-rest-spread",
"proposal-object-rest-spread": "proposal-object-rest-spread",
- "babel-plugin-proposal-optional-catch-binding": "babel-plugin-proposal-optional-catch-binding",
+ "babel-plugin-proposal-optional-catch-binding": "@babel/plugin-proposal-optional-catch-binding",
"proposal-optional-catch-binding": "proposal-optional-catch-binding",
- "babel-plugin-proposal-optional-chaining": "babel-plugin-proposal-optional-chaining",
+ "babel-plugin-proposal-optional-chaining": "@babel/plugin-proposal-optional-chaining",
"proposal-optional-chaining": "proposal-optional-chaining",
- "babel-plugin-proposal-pipeline-operator": "babel-plugin-proposal-pipeline-operator",
+ "babel-plugin-proposal-pipeline-operator": "@babel/plugin-proposal-pipeline-operator",
"proposal-pipeline-operator": "proposal-pipeline-operator",
- "babel-plugin-proposal-throw-expressions": "babel-plugin-proposal-throw-expressions",
+ "babel-plugin-proposal-throw-expressions": "@babel/plugin-proposal-throw-expressions",
"proposal-throw-expressions": "proposal-throw-expressions",
- "babel-plugin-proposal-unicode-property-regex": "babel-plugin-proposal-unicode-property-regex",
+ "babel-plugin-proposal-unicode-property-regex": "@babel/plugin-proposal-unicode-property-regex",
"proposal-unicode-property-regex": "proposal-unicode-property-regex",
- "babel-plugin-syntax-async-generators": "babel-plugin-syntax-async-generators",
+ "babel-plugin-syntax-async-generators": "@babel/plugin-syntax-async-generators",
"syntax-async-generators": "syntax-async-generators",
- "babel-plugin-syntax-bigint": "babel-plugin-syntax-bigint",
+ "babel-plugin-syntax-bigint": "@babel/plugin-syntax-bigint",
"syntax-bigint": "syntax-bigint",
- "babel-plugin-syntax-class-properties": "babel-plugin-syntax-class-properties",
+ "babel-plugin-syntax-class-properties": "@babel/plugin-syntax-class-properties",
"syntax-class-properties": "syntax-class-properties",
- "babel-plugin-syntax-decorators": "babel-plugin-syntax-decorators",
+ "babel-plugin-syntax-decorators": "@babel/plugin-syntax-decorators",
"syntax-decorators": "syntax-decorators",
- "babel-plugin-syntax-do-expressions": "babel-plugin-syntax-do-expressions",
+ "babel-plugin-syntax-do-expressions": "@babel/plugin-syntax-do-expressions",
"syntax-do-expressions": "syntax-do-expressions",
- "babel-plugin-syntax-dynamic-import": "babel-plugin-syntax-dynamic-import",
+ "babel-plugin-syntax-dynamic-import": "@babel/plugin-syntax-dynamic-import",
"syntax-dynamic-import": "syntax-dynamic-import",
- "babel-plugin-syntax-export-default-from": "babel-plugin-syntax-export-default-from",
+ "babel-plugin-syntax-export-default-from": "@babel/plugin-syntax-export-default-from",
"syntax-export-default-from": "syntax-export-default-from",
- "babel-plugin-syntax-export-namespace-from": "babel-plugin-syntax-export-namespace-from",
+ "babel-plugin-syntax-export-namespace-from": "@babel/plugin-syntax-export-namespace-from",
"syntax-export-namespace-from": "syntax-export-namespace-from",
- "babel-plugin-syntax-flow": "babel-plugin-syntax-flow",
+ "babel-plugin-syntax-flow": "@babel/plugin-syntax-flow",
"syntax-flow": "syntax-flow",
- "babel-plugin-syntax-function-bind": "babel-plugin-syntax-function-bind",
+ "babel-plugin-syntax-function-bind": "@babel/plugin-syntax-function-bind",
"syntax-function-bind": "syntax-function-bind",
- "babel-plugin-syntax-function-sent": "babel-plugin-syntax-function-sent",
+ "babel-plugin-syntax-function-sent": "@babel/plugin-syntax-function-sent",
"syntax-function-sent": "syntax-function-sent",
- "babel-plugin-syntax-import-meta": "babel-plugin-syntax-import-meta",
+ "babel-plugin-syntax-import-meta": "@babel/plugin-syntax-import-meta",
"syntax-import-meta": "syntax-import-meta",
- "babel-plugin-syntax-json-strings": "babel-plugin-syntax-json-strings",
+ "babel-plugin-syntax-json-strings": "@babel/plugin-syntax-json-strings",
"syntax-json-strings": "syntax-json-strings",
- "babel-plugin-syntax-jsx": "babel-plugin-syntax-jsx",
+ "babel-plugin-syntax-jsx": "@babel/plugin-syntax-jsx",
"syntax-jsx": "syntax-jsx",
- "babel-plugin-syntax-logical-assignment-operators": "babel-plugin-syntax-logical-assignment-operators",
+ "babel-plugin-syntax-logical-assignment-operators": "@babel/plugin-syntax-logical-assignment-operators",
"syntax-logical-assignment-operators": "syntax-logical-assignment-operators",
- "babel-plugin-syntax-nullish-coalescing-operator": "babel-plugin-syntax-nullish-coalescing-operator",
+ "babel-plugin-syntax-nullish-coalescing-operator": "@babel/plugin-syntax-nullish-coalescing-operator",
"syntax-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
- "babel-plugin-syntax-numeric-separator": "babel-plugin-syntax-numeric-separator",
+ "babel-plugin-syntax-numeric-separator": "@babel/plugin-syntax-numeric-separator",
"syntax-numeric-separator": "syntax-numeric-separator",
- "babel-plugin-syntax-object-rest-spread": "babel-plugin-syntax-object-rest-spread",
+ "babel-plugin-syntax-object-rest-spread": "@babel/plugin-syntax-object-rest-spread",
"syntax-object-rest-spread": "syntax-object-rest-spread",
- "babel-plugin-syntax-optional-catch-binding": "babel-plugin-syntax-optional-catch-binding",
+ "babel-plugin-syntax-optional-catch-binding": "@babel/plugin-syntax-optional-catch-binding",
"syntax-optional-catch-binding": "syntax-optional-catch-binding",
- "babel-plugin-syntax-optional-chaining": "babel-plugin-syntax-optional-chaining",
+ "babel-plugin-syntax-optional-chaining": "@babel/plugin-syntax-optional-chaining",
"syntax-optional-chaining": "syntax-optional-chaining",
- "babel-plugin-syntax-pipeline-operator": "babel-plugin-syntax-pipeline-operator",
+ "babel-plugin-syntax-pipeline-operator": "@babel/plugin-syntax-pipeline-operator",
"syntax-pipeline-operator": "syntax-pipeline-operator",
- "babel-plugin-syntax-throw-expressions": "babel-plugin-syntax-throw-expressions",
+ "babel-plugin-syntax-throw-expressions": "@babel/plugin-syntax-throw-expressions",
"syntax-throw-expressions": "syntax-throw-expressions",
- "babel-plugin-syntax-typescript": "babel-plugin-syntax-typescript",
+ "babel-plugin-syntax-typescript": "@babel/plugin-syntax-typescript",
"syntax-typescript": "syntax-typescript",
- "babel-plugin-transform-arrow-functions": "babel-plugin-transform-arrow-functions",
+ "babel-plugin-transform-arrow-functions": "@babel/plugin-transform-arrow-functions",
"transform-arrow-functions": "transform-arrow-functions",
- "babel-plugin-transform-async-to-generator": "babel-plugin-transform-async-to-generator",
+ "babel-plugin-transform-async-to-generator": "@babel/plugin-transform-async-to-generator",
"transform-async-to-generator": "transform-async-to-generator",
- "babel-plugin-transform-block-scoped-functions": "babel-plugin-transform-block-scoped-functions",
+ "babel-plugin-transform-block-scoped-functions": "@babel/plugin-transform-block-scoped-functions",
"transform-block-scoped-functions": "transform-block-scoped-functions",
- "babel-plugin-transform-block-scoping": "babel-plugin-transform-block-scoping",
+ "babel-plugin-transform-block-scoping": "@babel/plugin-transform-block-scoping",
"transform-block-scoping": "transform-block-scoping",
- "babel-plugin-transform-classes": "babel-plugin-transform-classes",
+ "babel-plugin-transform-classes": "@babel/plugin-transform-classes",
"transform-classes": "transform-classes",
- "babel-plugin-transform-computed-properties": "babel-plugin-transform-computed-properties",
+ "babel-plugin-transform-computed-properties": "@babel/plugin-transform-computed-properties",
"transform-computed-properties": "transform-computed-properties",
- "babel-plugin-transform-destructuring": "babel-plugin-transform-destructuring",
+ "babel-plugin-transform-destructuring": "@babel/plugin-transform-destructuring",
"transform-destructuring": "transform-destructuring",
- "babel-plugin-transform-dotall-regex": "babel-plugin-transform-dotall-regex",
+ "babel-plugin-transform-dotall-regex": "@babel/plugin-transform-dotall-regex",
"transform-dotall-regex": "transform-dotall-regex",
- "babel-plugin-transform-duplicate-keys": "babel-plugin-transform-duplicate-keys",
+ "babel-plugin-transform-duplicate-keys": "@babel/plugin-transform-duplicate-keys",
"transform-duplicate-keys": "transform-duplicate-keys",
- "babel-plugin-transform-exponentiation-operator": "babel-plugin-transform-exponentiation-operator",
+ "babel-plugin-transform-exponentiation-operator": "@babel/plugin-transform-exponentiation-operator",
"transform-exponentiation-operator": "transform-exponentiation-operator",
- "babel-plugin-transform-flow-comments": "babel-plugin-transform-flow-comments",
+ "babel-plugin-transform-flow-comments": "@babel/plugin-transform-flow-comments",
"transform-flow-comments": "transform-flow-comments",
- "babel-plugin-transform-flow-strip-types": "babel-plugin-transform-flow-strip-types",
+ "babel-plugin-transform-flow-strip-types": "@babel/plugin-transform-flow-strip-types",
"transform-flow-strip-types": "transform-flow-strip-types",
- "babel-plugin-transform-for-of": "babel-plugin-transform-for-of",
+ "babel-plugin-transform-for-of": "@babel/plugin-transform-for-of",
"transform-for-of": "transform-for-of",
- "babel-plugin-transform-function-name": "babel-plugin-transform-function-name",
+ "babel-plugin-transform-function-name": "@babel/plugin-transform-function-name",
"transform-function-name": "transform-function-name",
- "babel-plugin-transform-inline-consecutive-adds": "babel-plugin-transform-inline-consecutive-adds",
+ "babel-plugin-transform-inline-consecutive-adds": "@babel/plugin-transform-inline-consecutive-adds",
"transform-inline-consecutive-adds": "transform-inline-consecutive-adds",
"babel-plugin-transform-inline-environment-variables": "babel-plugin-transform-inline-environment-variables",
"transform-inline-environment-variables": "transform-inline-environment-variables",
- "babel-plugin-transform-instanceof": "babel-plugin-transform-instanceof",
+ "babel-plugin-transform-instanceof": "@babel/plugin-transform-instanceof",
"transform-instanceof": "transform-instanceof",
- "babel-plugin-transform-jscript": "babel-plugin-transform-jscript",
+ "babel-plugin-transform-jscript": "@babel/plugin-transform-jscript",
"transform-jscript": "transform-jscript",
- "babel-plugin-transform-literals": "babel-plugin-transform-literals",
+ "babel-plugin-transform-literals": "@babel/plugin-transform-literals",
"transform-literals": "transform-literals",
"babel-plugin-transform-member-expression-literals": "babel-plugin-transform-member-expression-literals",
"transform-member-expression-literals": "transform-member-expression-literals",
@@ -205,47 +205,47 @@
"transform-merge-sibling-variables": "transform-merge-sibling-variables",
"babel-plugin-transform-minify-booleans": "babel-plugin-transform-minify-booleans",
"transform-minify-booleans": "transform-minify-booleans",
- "babel-plugin-transform-modules-amd": "babel-plugin-transform-modules-amd",
+ "babel-plugin-transform-modules-amd": "@babel/plugin-transform-modules-amd",
"transform-modules-amd": "transform-modules-amd",
- "babel-plugin-transform-modules-commonjs": "babel-plugin-transform-modules-commonjs",
+ "babel-plugin-transform-modules-commonjs": "@babel/plugin-transform-modules-commonjs",
"transform-modules-commonjs": "transform-modules-commonjs",
- "babel-plugin-transform-modules-systemjs": "babel-plugin-transform-modules-systemjs",
+ "babel-plugin-transform-modules-systemjs": "@babel/plugin-transform-modules-systemjs",
"transform-modules-systemjs": "transform-modules-systemjs",
- "babel-plugin-transform-modules-umd": "babel-plugin-transform-modules-umd",
+ "babel-plugin-transform-modules-umd": "@babel/plugin-transform-modules-umd",
"transform-modules-umd": "transform-modules-umd",
- "babel-plugin-transform-new-target": "babel-plugin-transform-new-target",
+ "babel-plugin-transform-new-target": "@babel/plugin-transform-new-target",
"transform-new-target": "transform-new-target",
"babel-plugin-transform-node-env-inline": "babel-plugin-transform-node-env-inline",
"transform-node-env-inline": "transform-node-env-inline",
- "babel-plugin-transform-object-assign": "babel-plugin-transform-object-assign",
+ "babel-plugin-transform-object-assign": "@babel/plugin-transform-object-assign",
"transform-object-assign": "transform-object-assign",
- "babel-plugin-transform-object-set-prototype-of-to-assign": "babel-plugin-transform-object-set-prototype-of-to-assign",
+ "babel-plugin-transform-object-set-prototype-of-to-assign": "@babel/plugin-transform-object-set-prototype-of-to-assign",
"transform-object-set-prototype-of-to-assign": "transform-object-set-prototype-of-to-assign",
- "babel-plugin-transform-object-super": "babel-plugin-transform-object-super",
+ "babel-plugin-transform-object-super": "@babel/plugin-transform-object-super",
"transform-object-super": "transform-object-super",
- "babel-plugin-transform-parameters": "babel-plugin-transform-parameters",
+ "babel-plugin-transform-parameters": "@babel/plugin-transform-parameters",
"transform-parameters": "transform-parameters",
"babel-plugin-transform-property-literals": "babel-plugin-transform-property-literals",
"transform-property-literals": "transform-property-literals",
- "babel-plugin-transform-property-mutators": "babel-plugin-transform-property-mutators",
+ "babel-plugin-transform-property-mutators": "@babel/plugin-transform-property-mutators",
"transform-property-mutators": "transform-property-mutators",
- "babel-plugin-transform-proto-to-assign": "babel-plugin-transform-proto-to-assign",
+ "babel-plugin-transform-proto-to-assign": "@babel/plugin-transform-proto-to-assign",
"transform-proto-to-assign": "transform-proto-to-assign",
- "babel-plugin-transform-react-constant-elements": "babel-plugin-transform-react-constant-elements",
+ "babel-plugin-transform-react-constant-elements": "@babel/plugin-transform-react-constant-elements",
"transform-react-constant-elements": "transform-react-constant-elements",
- "babel-plugin-transform-react-display-name": "babel-plugin-transform-react-display-name",
+ "babel-plugin-transform-react-display-name": "@babel/plugin-transform-react-display-name",
"transform-react-display-name": "transform-react-display-name",
- "babel-plugin-transform-react-inline-elements": "babel-plugin-transform-react-inline-elements",
+ "babel-plugin-transform-react-inline-elements": "@babel/plugin-transform-react-inline-elements",
"transform-react-inline-elements": "transform-react-inline-elements",
- "babel-plugin-transform-react-jsx-compat": "babel-plugin-transform-react-jsx-compat",
+ "babel-plugin-transform-react-jsx-compat": "@babel/plugin-transform-react-jsx-compat",
"transform-react-jsx-compat": "transform-react-jsx-compat",
- "babel-plugin-transform-react-jsx-self": "babel-plugin-transform-react-jsx-self",
+ "babel-plugin-transform-react-jsx-self": "@babel/plugin-transform-react-jsx-self",
"transform-react-jsx-self": "transform-react-jsx-self",
- "babel-plugin-transform-react-jsx-source": "babel-plugin-transform-react-jsx-source",
+ "babel-plugin-transform-react-jsx-source": "@babel/plugin-transform-react-jsx-source",
"transform-react-jsx-source": "transform-react-jsx-source",
- "babel-plugin-transform-react-jsx": "babel-plugin-transform-react-jsx",
+ "babel-plugin-transform-react-jsx": "@babel/plugin-transform-react-jsx",
"transform-react-jsx": "transform-react-jsx",
- "babel-plugin-transform-regenerator": "babel-plugin-transform-regenerator",
+ "babel-plugin-transform-regenerator": "@babel/plugin-transform-regenerator",
"transform-regenerator": "transform-regenerator",
"babel-plugin-transform-regexp-constructors": "babel-plugin-transform-regexp-constructors",
"transform-regexp-constructors": "transform-regexp-constructors",
@@ -255,56 +255,56 @@
"transform-remove-debugger": "transform-remove-debugger",
"babel-plugin-transform-remove-undefined": "babel-plugin-transform-remove-undefined",
"transform-remove-undefined": "transform-remove-undefined",
- "babel-plugin-transform-reserved-words": "babel-plugin-transform-reserved-words",
+ "babel-plugin-transform-reserved-words": "@babel/plugin-transform-reserved-words",
"transform-reserved-words": "transform-reserved-words",
- "babel-plugin-transform-runtime": "babel-plugin-transform-runtime",
+ "babel-plugin-transform-runtime": "@babel/plugin-transform-runtime",
"transform-runtime": "transform-runtime",
- "babel-plugin-transform-shorthand-properties": "babel-plugin-transform-shorthand-properties",
+ "babel-plugin-transform-shorthand-properties": "@babel/plugin-transform-shorthand-properties",
"transform-shorthand-properties": "transform-shorthand-properties",
"babel-plugin-transform-simplify-comparison-operators": "babel-plugin-transform-simplify-comparison-operators",
"transform-simplify-comparison-operators": "transform-simplify-comparison-operators",
- "babel-plugin-transform-spread": "babel-plugin-transform-spread",
+ "babel-plugin-transform-spread": "@babel/plugin-transform-spread",
"transform-spread": "transform-spread",
- "babel-plugin-transform-sticky-regex": "babel-plugin-transform-sticky-regex",
+ "babel-plugin-transform-sticky-regex": "@babel/plugin-transform-sticky-regex",
"transform-sticky-regex": "transform-sticky-regex",
- "babel-plugin-transform-strict-mode": "babel-plugin-transform-strict-mode",
+ "babel-plugin-transform-strict-mode": "@babel/plugin-transform-strict-mode",
"transform-strict-mode": "transform-strict-mode",
- "babel-plugin-transform-template-literals": "babel-plugin-transform-template-literals",
+ "babel-plugin-transform-template-literals": "@babel/plugin-transform-template-literals",
"transform-template-literals": "transform-template-literals",
- "babel-plugin-transform-typeof-symbol": "babel-plugin-transform-typeof-symbol",
+ "babel-plugin-transform-typeof-symbol": "@babel/plugin-transform-typeof-symbol",
"transform-typeof-symbol": "transform-typeof-symbol",
- "babel-plugin-transform-typescript": "babel-plugin-transform-typescript",
+ "babel-plugin-transform-typescript": "@babel/plugin-transform-typescript",
"transform-typescript": "transform-typescript",
"babel-plugin-transform-undefined-to-void": "babel-plugin-transform-undefined-to-void",
"transform-undefined-to-void": "transform-undefined-to-void",
- "babel-plugin-transform-unicode-regex": "babel-plugin-transform-unicode-regex",
+ "babel-plugin-transform-unicode-regex": "@babel/plugin-transform-unicode-regex",
"transform-unicode-regex": "transform-unicode-regex",
"plugins": "Plugins",
"babel-polyfill": "babel-polyfill",
- "babel-preset-env-standalone": "babel-preset-env-standalone",
+ "babel-preset-env-standalone": "@babel/preset-env-standalone",
"env-standalone": "env-standalone",
- "babel-preset-env": "babel-preset-env",
- "babel-preset-es2015": "babel-preset-es2015",
+ "babel-preset-env": "@babel/preset-env",
+ "babel-preset-es2015": "@babel/preset-es2015",
"es2015": "es2015",
- "babel-preset-es2016": "babel-preset-es2016",
+ "babel-preset-es2016": "@babel/preset-es2016",
"es2016": "es2016",
- "babel-preset-es2017": "babel-preset-es2017",
+ "babel-preset-es2017": "@babel/preset-es2017",
"es2017": "es2017",
- "babel-preset-flow": "babel-preset-flow",
+ "babel-preset-flow": "@babel/preset-flow",
"flow": "flow",
"babel-preset-minify": "babel-preset-minify",
"minify": "minify",
- "babel-preset-react": "babel-preset-react",
+ "babel-preset-react": "@babel/preset-react",
"react": "react",
- "babel-preset-stage-0": "babel-preset-stage-0",
+ "babel-preset-stage-0": "@babel/preset-stage-0",
"stage-0": "stage-0",
- "babel-preset-stage-1": "babel-preset-stage-1",
+ "babel-preset-stage-1": "@babel/preset-stage-1",
"stage-1": "stage-1",
- "babel-preset-stage-2": "babel-preset-stage-2",
+ "babel-preset-stage-2": "@babel/preset-stage-2",
"stage-2": "stage-2",
- "babel-preset-stage-3": "babel-preset-stage-3",
+ "babel-preset-stage-3": "@babel/preset-stage-3",
"stage-3": "stage-3",
- "babel-preset-typescript": "babel-preset-typescript",
+ "babel-preset-typescript": "@babel/preset-typescript",
"typescript": "typescript",
"presets": "Presets",
"babel-register": "babel-register",
diff --git a/website/sidebars.json b/website/sidebars.json
index 511230df32..326bb7e4b7 100644
--- a/website/sidebars.json
+++ b/website/sidebars.json
@@ -17,8 +17,8 @@
"roadmap"
],
"Usage": [
- "babelconfigjs",
- "babelrc",
+ "options",
+ "config-files",
"babel-cli",
"babel-polyfill",
"babel-plugin-transform-runtime",