@@ -73,7 +73,7 @@ const sassModuleRegex = /\.module\.(scss|sass)$/;
7373
7474// This is the production and development configuration.
7575// It is focused on developer experience, fast rebuilds, and a minimal bundle.
76- module . exports = function ( webpackEnv ) {
76+ module . exports = function ( webpackEnv ) {
7777 const isEnvDevelopment = webpackEnv === 'development' ;
7878 const isEnvProduction = webpackEnv === 'production' ;
7979
@@ -196,12 +196,13 @@ module.exports = function(webpackEnv) {
196196 publicPath : paths . publicUrlOrPath ,
197197 // Point sourcemap entries to original disk location (format as URL on Windows)
198198 devtoolModuleFilenameTemplate : isEnvProduction
199- ? info =>
199+ ? ( info ) =>
200200 path
201201 . relative ( paths . appSrc , info . absoluteResourcePath )
202202 . replace ( / \\ / g, '/' )
203203 : isEnvDevelopment &&
204- ( info => path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
204+ ( ( info ) =>
205+ path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
205206 // Prevents conflicts when multiple webpack runtimes (from different apps)
206207 // are used on the same page.
207208 jsonpFunction : `webpackJsonp${ appPackageJson . name } ` ,
@@ -284,7 +285,7 @@ module.exports = function(webpackEnv) {
284285 // https://twitter.com/wSokra/status/969679223278505985
285286 // https://github.com/facebook/create-react-app/issues/5358
286287 runtimeChunk : {
287- name : entrypoint => `runtime-${ entrypoint . name } ` ,
288+ name : ( entrypoint ) => `runtime-${ entrypoint . name } ` ,
288289 } ,
289290 } ,
290291 resolve : {
@@ -302,8 +303,8 @@ module.exports = function(webpackEnv) {
302303 // `web` extension prefixes have been added for better support
303304 // for React Native Web.
304305 extensions : paths . moduleFileExtensions
305- . map ( ext => `.${ ext } ` )
306- . filter ( ext => useTypeScript || ! ext . includes ( 'ts' ) ) ,
306+ . map ( ( ext ) => `.${ ext } ` )
307+ . filter ( ( ext ) => useTypeScript || ! ext . includes ( 'ts' ) ) ,
307308 alias : {
308309 // Support React Native Web
309310 // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
@@ -643,7 +644,7 @@ module.exports = function(webpackEnv) {
643644 // wptheme added FileWatcherPlugin
644645 // For create-react-wptheme: watch addition files in the public folder for changes
645646 // touchFile is used to force WebPack to do a rebuild. It must be a file that WebPack is watching.
646- new FileWatcherPlugin ( fileWatcherPluginConfig ) ,
647+ isEnvDevelopment && new FileWatcherPlugin ( fileWatcherPluginConfig ) ,
647648 // If you require a missing module and then `npm install` it, you still have
648649 // to restart the development server for webpack to discover it. This plugin
649650 // makes the discovery automatic so you don't have to restart.
@@ -674,7 +675,7 @@ module.exports = function(webpackEnv) {
674675 return manifest ;
675676 } , seed ) ;
676677 const entrypointFiles = entrypoints . main . filter (
677- fileName => ! fileName . endsWith ( '.map' )
678+ ( fileName ) => ! fileName . endsWith ( '.map' )
678679 ) ;
679680
680681 return {
0 commit comments