@@ -6,7 +6,7 @@ import path from 'path';
66import webpack from 'webpack' ;
77import WebpackMd5Hash from 'webpack-md5-hash' ;
88
9- import { happyPackPlugin } from '../utils' ;
9+ import { happyPackPlugin , log } from '../utils' ;
1010import { ifElse } from '../../shared/utils/logic' ;
1111import { mergeDeep } from '../../shared/utils/objects' ;
1212import { removeNil } from '../../shared/utils/arrays' ;
@@ -44,18 +44,20 @@ export default function webpackConfigFactory(buildOptions) {
4444 const ifDevClient = ifElse ( isDev && isClient ) ;
4545 const ifProdClient = ifElse ( isProd && isClient ) ;
4646
47- console . log (
48- `==> Creating ${ isProd
47+ log ( {
48+ level : 'info' ,
49+ title : 'Webpack' ,
50+ message : `Creating ${ isProd
4951 ? 'an optimised'
5052 : 'a development' } bundle configuration for the "${ target } "`,
51- ) ;
53+ } ) ;
5254
5355 const bundleConfig =
5456 isServer || isClient
5557 ? // This is either our "server" or "client" bundle.
56- config ( [ 'bundles' , target ] )
58+ config ( [ 'bundles' , target ] )
5759 : // Otherwise it must be an additional node bundle.
58- config ( [ 'additionalNodeBundles' , target ] ) ;
60+ config ( [ 'additionalNodeBundles' , target ] ) ;
5961
6062 if ( ! bundleConfig ) {
6163 throw new Error ( 'No bundle configuration exists for target:' , target ) ;
@@ -124,9 +126,9 @@ export default function webpackConfigFactory(buildOptions) {
124126
125127 target : isClient
126128 ? // Only our client bundle will target the web as a runtime.
127- 'web'
129+ 'web'
128130 : // Any other bundle must be targetting node as a runtime.
129- 'node' ,
131+ 'node' ,
130132
131133 // Ensure that webpack polyfills the following node features for use
132134 // within any bundles that are targetting node as a runtime. This will be
@@ -517,12 +519,12 @@ export default function webpackConfigFactory(buildOptions) {
517519 // paths used on the client.
518520 publicPath : isDev
519521 ? // When running in dev mode the client bundle runs on a
520- // seperate port so we need to put an absolute path here.
521- `http://${ config ( 'host' ) } :${ config ( 'clientDevServerPort' ) } ${ config (
522- 'bundles.client.webPath' ,
523- ) } `
522+ // seperate port so we need to put an absolute path here.
523+ `http://${ config ( 'host' ) } :${ config ( 'clientDevServerPort' ) } ${ config (
524+ 'bundles.client.webPath' ,
525+ ) } `
524526 : // Otherwise we just use the configured web path for the client.
525- config ( 'bundles.client.webPath' ) ,
527+ config ( 'bundles.client.webPath' ) ,
526528 // We only emit files when building a web bundle, for the server
527529 // bundle we only care about the file loader being able to create
528530 // the correct asset URLs.
0 commit comments