Skip to content

Commit 6e97c1a

Browse files
iansuTimer
authored andcommitted
Switch back to babel-loader (facebook#5143)
* Switch back to babel-loader * Preserve existing caller options. Use Object.assign instead of object spread. * Updated filename in package.json * Update comment about cache identifier * Update macro check to use a regex * Move macro check regex out of function
1 parent 0764c47 commit 6e97c1a

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

config/webpack.config.dev.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ module.exports = {
218218
},
219219
},
220220
{
221-
// We need to use our own loader until `babel-loader` supports
222-
// customization
223-
// https://github.com/babel/babel-loader/pull/687
224-
loader: require.resolve('babel-preset-react-app/loader'),
221+
loader: require.resolve('babel-loader'),
225222
options: {
223+
customize: require.resolve(
224+
'babel-preset-react-app/webpack-overrides'
225+
),
226226
// @remove-on-eject-begin
227227
babelrc: false,
228228
configFile: false,

config/webpack.config.prod.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,11 @@ module.exports = {
272272
// We need to use our own loader until `babel-loader` supports
273273
// customization
274274
// https://github.com/babel/babel-loader/pull/687
275-
loader: require.resolve('babel-preset-react-app/loader'),
275+
loader: require.resolve('babel-loader'),
276276
options: {
277+
customize: require.resolve(
278+
'babel-preset-react-app/webpack-overrides'
279+
),
277280
// @remove-on-eject-begin
278281
babelrc: false,
279282
configFile: false,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"babel-core": "7.0.0-bridge.0",
2727
"babel-eslint": "9.0.0",
2828
"babel-jest": "23.6.0",
29-
"babel-loader": "8.0.2",
29+
"babel-loader": "8.0.4",
3030
"babel-plugin-named-asset-import": "^0.2.0",
3131
"babel-preset-react-app": "^4.0.0",
3232
"bfj": "6.1.1",

0 commit comments

Comments
 (0)