Skip to content

Commit 858034b

Browse files
authored
Remove babel 6 mentions
1 parent a015f5a commit 858034b

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ This package allows transpiling JavaScript files using [Babel](https://github.co
2929
npm install -D babel-loader @babel/core @babel/preset-env webpack
3030
```
3131

32-
> webpack 4.x | babel-loader 7.x | babel 6.x
33-
34-
```bash
35-
npm install -D babel-loader@7 babel-core babel-preset-env webpack
36-
```
37-
3832
<h2 align="center">Usage</h2>
3933

4034
webpack documentation: [Loaders](https://webpack.js.org/loaders/)
@@ -86,7 +80,7 @@ This loader also supports the following loader-specific option:
8680

8781
* `cacheDirectory`: Default `false`. When set, the given directory will be used to cache the results of the loader. Future webpack builds will attempt to read from the cache to avoid needing to run the potentially expensive Babel recompilation process on each run. If the value is blank (`loader: 'babel-loader?cacheDirectory'`) or `true` (`loader: 'babel-loader?cacheDirectory=true'`), the loader will use the default cache directory in `node_modules/.cache/babel-loader` or fallback to the default OS temporary file directory if no `node_modules` folder could be found in any root directory.
8882

89-
* `cacheIdentifier`: Default is a string composed by the `babel-core`'s version, the `babel-loader`'s version, the contents of `.babelrc` file if it exists, and the value of the environment variable `BABEL_ENV` with a fallback to the `NODE_ENV` environment variable. This can be set to a custom value to force cache busting if the identifier changes.
83+
* `cacheIdentifier`: Default is a string composed by the `@babel/core`'s version, the `babel-loader`'s version, the contents of `.babelrc` file if it exists, and the value of the environment variable `BABEL_ENV` with a fallback to the `NODE_ENV` environment variable. This can be set to a custom value to force cache busting if the identifier changes.
9084

9185
* `cacheCompression`: Default `true`. When set, each Babel transform output will be compressed with Gzip. If you want to opt-out of cache compression, set it to `false` -- your project may benefit from this if it transpiles thousands of files.
9286

@@ -108,11 +102,11 @@ Babel uses very small helpers for common functions such as `_extend`. By default
108102

109103
You can instead require the Babel runtime as a separate module to avoid the duplication.
110104

111-
The following configuration disables automatic per-file runtime injection in Babel, requiring `babel-plugin-transform-runtime` instead and making all helper references use it.
105+
The following configuration disables automatic per-file runtime injection in Babel, requiring `@babel/plugin-transform-runtime` instead and making all helper references use it.
112106

113107
See the [docs](https://babeljs.io/docs/plugins/transform-runtime/) for more information.
114108

115-
**NOTE**: You must run `npm install -D @babel/plugin-transform-runtime` to include this in your project and `babel-runtime` itself as a dependency with `npm install @babel/runtime`.
109+
**NOTE**: You must run `npm install -D @babel/plugin-transform-runtime` to include this in your project and `@babel/runtime` itself as a dependency with `npm install @babel/runtime`.
116110

117111
```javascript
118112
rules: [
@@ -134,7 +128,7 @@ rules: [
134128

135129
#### **NOTE**: transform-runtime & custom polyfills (e.g. Promise library)
136130

137-
Since [babel-plugin-transform-runtime](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime) includes a polyfill that includes a custom [regenerator-runtime](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js) and [core-js](https://github.com/zloirock/core-js), the following usual shimming method using `webpack.ProvidePlugin` will not work:
131+
Since [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime) includes a polyfill that includes a custom [regenerator-runtime](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js) and [core-js](https://github.com/zloirock/core-js), the following usual shimming method using `webpack.ProvidePlugin` will not work:
138132

139133
```javascript
140134
// ...
@@ -190,7 +184,7 @@ If you receive this message, it means that you have the npm package `babel` inst
190184

191185
webpack then tries to load the `babel` package instead of the `babel-loader`.
192186

193-
To fix this, you should uninstall the npm package `babel`, as it is deprecated in Babel v6. (Instead, install `babel-cli` or `babel-core`.)
187+
To fix this, you should uninstall the npm package `babel`, as it is deprecated in Babel v6. (Instead, install `@babel/cli` or `@babel/core`.)
194188
In the case one of your dependencies is installing `babel` and you cannot uninstall it yourself, use the complete name of the loader in the webpack config:
195189
```javascript
196190
{

0 commit comments

Comments
 (0)