Skip to content

Commit 71f5572

Browse files
fsonrandycoulman
authored andcommitted
Remove custom babel-loader cache dir config (facebook#983)
Upgrade `babel-loader` and remove the cache directory configuration that was added in facebook#620. `babel-loader` now uses the `./node_modules/.cache/babel-loader` directory by default, so the custom config is no longer needed.
1 parent 72928de commit 71f5572

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/react-scripts/config/webpack.config.dev.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
var path = require('path');
1313
var autoprefixer = require('autoprefixer');
1414
var webpack = require('webpack');
15-
var findCacheDir = require('find-cache-dir');
1615
var HtmlWebpackPlugin = require('html-webpack-plugin');
1716
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
1817
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
@@ -140,12 +139,9 @@ module.exports = function(publicPath) {
140139
],
141140
// @remove-on-eject-end
142141
// This is a feature of `babel-loader` for webpack (not Babel itself).
143-
// It enables caching results in ./node_modules/.cache/react-scripts/
144-
// directory for faster rebuilds. We use findCacheDir() because of:
145-
// https://github.com/facebookincubator/create-react-app/issues/483
146-
cacheDirectory: findCacheDir({
147-
name: 'react-scripts'
148-
})
142+
// It enables caching results in ./node_modules/.cache/babel-loader/
143+
// directory for faster rebuilds.
144+
cacheDirectory: true
149145
}
150146
},
151147
// "postcss" loader applies autoprefixer to our CSS.

packages/react-scripts/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"babel-core": "6.17.0",
2828
"babel-eslint": "7.0.0",
2929
"babel-jest": "16.0.0",
30-
"babel-loader": "6.2.5",
30+
"babel-loader": "6.2.7",
3131
"babel-preset-latest": "^6.16.0",
3232
"babel-preset-react": "^6.16.0",
3333
"babel-preset-stage-1": "^6.16.0",
@@ -48,7 +48,6 @@
4848
"extract-text-webpack-plugin": "1.0.1",
4949
"file-loader": "0.9.0",
5050
"filesize": "3.3.0",
51-
"find-cache-dir": "0.1.1",
5251
"fs-extra": "0.30.0",
5352
"gzip-size": "3.0.0",
5453
"html-webpack-plugin": "2.24.0",

0 commit comments

Comments
 (0)