@@ -73,7 +73,7 @@ const sassModuleRegex = /\.module\.(scss|sass)$/;
73
73
74
74
// This is the production and development configuration.
75
75
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
76
- module . exports = function ( webpackEnv ) {
76
+ module . exports = function ( webpackEnv ) {
77
77
const isEnvDevelopment = webpackEnv === 'development' ;
78
78
const isEnvProduction = webpackEnv === 'production' ;
79
79
@@ -196,12 +196,13 @@ module.exports = function(webpackEnv) {
196
196
publicPath : paths . publicUrlOrPath ,
197
197
// Point sourcemap entries to original disk location (format as URL on Windows)
198
198
devtoolModuleFilenameTemplate : isEnvProduction
199
- ? info =>
199
+ ? ( info ) =>
200
200
path
201
201
. relative ( paths . appSrc , info . absoluteResourcePath )
202
202
. replace ( / \\ / g, '/' )
203
203
: isEnvDevelopment &&
204
- ( info => path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
204
+ ( ( info ) =>
205
+ path . resolve ( info . absoluteResourcePath ) . replace ( / \\ / g, '/' ) ) ,
205
206
// Prevents conflicts when multiple webpack runtimes (from different apps)
206
207
// are used on the same page.
207
208
jsonpFunction : `webpackJsonp${ appPackageJson . name } ` ,
@@ -284,7 +285,7 @@ module.exports = function(webpackEnv) {
284
285
// https://twitter.com/wSokra/status/969679223278505985
285
286
// https://github.com/facebook/create-react-app/issues/5358
286
287
runtimeChunk : {
287
- name : entrypoint => `runtime-${ entrypoint . name } ` ,
288
+ name : ( entrypoint ) => `runtime-${ entrypoint . name } ` ,
288
289
} ,
289
290
} ,
290
291
resolve : {
@@ -302,8 +303,8 @@ module.exports = function(webpackEnv) {
302
303
// `web` extension prefixes have been added for better support
303
304
// for React Native Web.
304
305
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' ) ) ,
307
308
alias : {
308
309
// Support React Native Web
309
310
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
@@ -643,7 +644,7 @@ module.exports = function(webpackEnv) {
643
644
// wptheme added FileWatcherPlugin
644
645
// For create-react-wptheme: watch addition files in the public folder for changes
645
646
// 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 ) ,
647
648
// If you require a missing module and then `npm install` it, you still have
648
649
// to restart the development server for webpack to discover it. This plugin
649
650
// makes the discovery automatic so you don't have to restart.
@@ -674,7 +675,7 @@ module.exports = function(webpackEnv) {
674
675
return manifest ;
675
676
} , seed ) ;
676
677
const entrypointFiles = entrypoints . main . filter (
677
- fileName => ! fileName . endsWith ( '.map' )
678
+ ( fileName ) => ! fileName . endsWith ( '.map' )
678
679
) ;
679
680
680
681
return {
0 commit comments