Skip to content

Commit

Permalink
Add not about cacheCompression in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee committed Feb 5, 2018
1 parent e55e91f commit 60e4480
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> This readme is for babel-loader v8 + Babel v7
> This readme is for babel-loader v8 + Babel v7
> Check the [7.x branch](https://github.com/babel/babel-loader/tree/7.x) for docs with Babel v6
[![NPM Status](https://img.shields.io/npm/v/babel-loader.svg?style=flat)](https://www.npmjs.com/package/babel-loader)
Expand Down Expand Up @@ -88,7 +88,9 @@ This loader also supports the following loader-specific option:

* `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.

* `forceEnv`: Default will resolve BABEL_ENV then NODE_ENV. Allow you to override BABEL_ENV/NODE_ENV at the loader level. Useful for isomorphic applications with different babel configuration for client and server.
* `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.

* `forceEnv`: Default will resolve `BABEL_ENV` then `NODE_ENV`. Allow you to override `BABEL_ENV`/`NODE_ENV` at the loader level. Useful for isomorphic applications with different babel configuration for client and server.

__Note:__ The `sourceMap` option is ignored, instead sourceMaps are automatically enabled when webpack is configured to use them (via the `devtool` config option).

Expand Down

0 comments on commit 60e4480

Please sign in to comment.