diff options
Diffstat (limited to 'src/plugins/compressionPlugin.ts')
-rw-r--r-- | src/plugins/compressionPlugin.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/compressionPlugin.ts b/src/plugins/compressionPlugin.ts index 7b9feeb..a5bc402 100644 --- a/src/plugins/compressionPlugin.ts +++ b/src/plugins/compressionPlugin.ts | |||
@@ -20,10 +20,9 @@ const test = /\.(js|css|svg|txt)$/; | |||
20 | export default function compressionPlugin(): Plugin<void> { | 20 | export default function compressionPlugin(): Plugin<void> { |
21 | return { | 21 | return { |
22 | name: 'marussy-compression-plugin', | 22 | name: 'marussy-compression-plugin', |
23 | configureWebpack: (_config, isServer) => | 23 | configureWebpack: ({ mode }) => |
24 | isServer | 24 | mode === 'production' |
25 | ? {} | 25 | ? { |
26 | : { | ||
27 | plugins: [ | 26 | plugins: [ |
28 | new CompressionPlugin({ | 27 | new CompressionPlugin({ |
29 | test, | 28 | test, |
@@ -39,6 +38,7 @@ export default function compressionPlugin(): Plugin<void> { | |||
39 | minRatio, | 38 | minRatio, |
40 | }), | 39 | }), |
41 | ], | 40 | ], |
42 | }, | 41 | } |
42 | : {}, | ||
43 | }; | 43 | }; |
44 | } | 44 | } |