@@ -7,17 +7,7 @@ const path = require('path');
7
7
let publicPath = process . env . CDN_URL || '/api/cdn/public' ;
8
8
publicPath += '/static-assets' ;
9
9
10
- // Import Speed measure plugin
11
- const SpeedMeasurePlugin = require ( 'speed-measure-webpack-plugin' ) ;
12
-
13
- // Import Happypack plugin
14
- const HappyPack = require ( 'happypack' ) ;
15
-
16
- // Create Speed measure plugin instance to measure the build time
17
- const smp = new SpeedMeasurePlugin ( ) ;
18
-
19
- // Wrap the webpack config with Speed measure plugin instance to measure the build time
20
- module . exports = smp . wrap ( {
10
+ module . exports = {
21
11
entry : {
22
12
'loading-indicator-animation' : './src/client/loading-indicator-animation' ,
23
13
} ,
@@ -40,21 +30,18 @@ module.exports = smp.wrap({
40
30
* are not bundled. */
41
31
/ u t i l s [ \\ / ] r o u t e r [ \\ / ] r e q u i r e / ,
42
32
] ,
43
- /* Changed the rule to support for .png .svg and .jpg and jpeg files and
44
- * using happypack loader for parallelism
45
- */
46
33
rules : [
47
34
{
48
- test : / \. ( p n g | j p e ? g | s v g ) $ / i,
35
+ test : / \. s v g $ / ,
36
+ loader : 'file-loader' ,
37
+ options : {
38
+ outputPath : '/images/' ,
39
+ publicPath : `${ publicPath } /images` ,
40
+ } ,
49
41
exclude : / n o d e _ m o d u l e s / ,
50
- use : [ 'happypack/loader' ] ,
51
42
} ,
52
43
] ,
53
44
} ,
54
- // Marking optimization as false to cut time in terser plugin minification step
55
- optimization : {
56
- minimize : false ,
57
- } ,
58
45
plugins : [
59
46
new CopyWebpackPlugin ( [ {
60
47
from : path . resolve ( __dirname , '../../src/assets/mock-data' ) ,
@@ -90,18 +77,5 @@ module.exports = smp.wrap({
90
77
swDest : path . resolve ( __dirname , '../../build/sw.js' ) ,
91
78
importWorkboxFrom : 'local' ,
92
79
} ) ,
93
- // Adding happypack plugin
94
- new HappyPack ( {
95
- // Adding the file-loader alongwith its options to instansiate with happypack
96
- loaders : [
97
- {
98
- loader : 'file-loader' ,
99
- options : {
100
- outputPath : '/images/' ,
101
- publicPath : `${ publicPath } /images` ,
102
- } ,
103
- } ,
104
- ] ,
105
- } ) ,
106
80
] ,
107
- } ) ;
81
+ } ;
0 commit comments