mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-28 09:25:42 +08:00
Remove custom babel-loader cache dir config (#983)
Upgrade `babel-loader` and remove the cache directory configuration that was added in #620. `babel-loader` now uses the `./node_modules/.cache/babel-loader` directory by default, so the custom config is no longer needed.
This commit is contained in:
committed by
Dan Abramov
parent
7ce4b6e0e4
commit
6bda4b9726
@@ -12,7 +12,6 @@
|
||||
var path = require('path');
|
||||
var autoprefixer = require('autoprefixer');
|
||||
var webpack = require('webpack');
|
||||
var findCacheDir = require('find-cache-dir');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
|
||||
var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
|
||||
@@ -122,12 +121,9 @@ module.exports = {
|
||||
presets: [require.resolve('babel-preset-react-app')],
|
||||
// @remove-on-eject-end
|
||||
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
||||
// It enables caching results in ./node_modules/.cache/react-scripts/
|
||||
// directory for faster rebuilds. We use findCacheDir() because of:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/483
|
||||
cacheDirectory: findCacheDir({
|
||||
name: 'react-scripts'
|
||||
})
|
||||
// It enables caching results in ./node_modules/.cache/babel-loader/
|
||||
// directory for faster rebuilds.
|
||||
cacheDirectory: true
|
||||
}
|
||||
},
|
||||
// "postcss" loader applies autoprefixer to our CSS.
|
||||
|
||||
Reference in New Issue
Block a user