@@ -402,45 +402,47 @@ module.exports = function(webpackEnv) {
402402 {
403403 loader : require . resolve ( 'webpack-wci18n' ) ,
404404 } ,
405+ {
406+ loader : require . resolve ( 'babel-loader' ) ,
407+ options : {
408+ babelrc : false ,
409+ configFile : false ,
410+ compact : false ,
411+ presets : [
412+ [
413+ require . resolve ( 'babel-preset-react-app/dependencies' ) ,
414+ { helpers : true } ,
415+ ] ,
416+ ] ,
417+ plugins : [
418+ [
419+ require . resolve ( 'babel-plugin-bundled-import-meta' ) ,
420+ { importStyle : 'iife' } ,
421+ ] ,
422+ ] ,
423+ cacheDirectory : true ,
424+ cacheCompression : isEnvProduction ,
425+ // @remove -on-eject-begin
426+ cacheIdentifier : getCacheIdentifier (
427+ isEnvProduction
428+ ? 'production'
429+ : isEnvDevelopment && 'development' ,
430+ [
431+ 'babel-plugin-named-asset-import' ,
432+ 'babel-preset-react-app' ,
433+ 'react-dev-utils' ,
434+ 'react-scripts' ,
435+ ]
436+ ) ,
437+ // @remove -on-eject-end
438+ // If an error happens in a package, it's possible to be
439+ // because it was compiled. Thus, we don't want the browser
440+ // debugger to show the original code. Instead, the code
441+ // being evaluated would be much more helpful.
442+ sourceMaps : false ,
443+ } ,
444+ } ,
405445 ] ,
406- loader : require . resolve ( 'babel-loader' ) ,
407- options : {
408- babelrc : false ,
409- configFile : false ,
410- compact : false ,
411- presets : [
412- [
413- require . resolve ( 'babel-preset-react-app/dependencies' ) ,
414- { helpers : true } ,
415- ] ,
416- ] ,
417- plugins : [
418- [
419- require . resolve ( 'babel-plugin-bundled-import-meta' ) ,
420- { importStyle : 'iife' } ,
421- ] ,
422- ] ,
423- cacheDirectory : true ,
424- cacheCompression : isEnvProduction ,
425- // @remove -on-eject-begin
426- cacheIdentifier : getCacheIdentifier (
427- isEnvProduction
428- ? 'production'
429- : isEnvDevelopment && 'development' ,
430- [
431- 'babel-plugin-named-asset-import' ,
432- 'babel-preset-react-app' ,
433- 'react-dev-utils' ,
434- 'react-scripts' ,
435- ]
436- ) ,
437- // @remove -on-eject-end
438- // If an error happens in a package, it's possible to be
439- // because it was compiled. Thus, we don't want the browser
440- // debugger to show the original code. Instead, the code
441- // being evaluated would be much more helpful.
442- sourceMaps : false ,
443- } ,
444446 } ,
445447 // "postcss" loader applies autoprefixer to our CSS.
446448 // "css" loader resolves paths in CSS and adds assets as dependencies.
0 commit comments