|
1 | | -const { copyFileSync, readFileSync } = require('fs') |
2 | 1 | const { dirname, join } = require('path') |
3 | 2 | const AppManifestWebpackPlugin = require('app-manifest-webpack-plugin') |
4 | 3 | const CleanWebpackPlugin = require('clean-webpack-plugin') |
5 | 4 | const CopyWebpackPlugin = require('copy-webpack-plugin') |
6 | 5 | const DefinePlugin = require('webpack/lib/DefinePlugin') |
7 | 6 | const EnvironmentPlugin = require('webpack/lib/EnvironmentPlugin') |
8 | | -const EventHooksPlugin = require('event-hooks-webpack-plugin') |
9 | 7 | const HtmlWebpackPlugin = require('html-webpack-plugin') |
10 | 8 | const sass = require('sass') |
11 | 9 | const autoprefixer = require('autoprefixer') |
12 | 10 | const mqpacker = require('css-mqpacker') |
13 | | -const get = require('lodash.get') |
14 | | -const { map } = require('@code.gov/cautious') |
| 11 | +const ImageminPlugin = require('imagemin-webpack-plugin').default |
15 | 12 |
|
16 | 13 | const rootDir = dirname(dirname(__dirname)) |
17 | 14 | const nodeModulesDir = join(rootDir, 'node_modules') |
@@ -227,6 +224,7 @@ module.exports = { |
227 | 224 | new EnvironmentPlugin(['CODE_GOV_API_BASE', 'CODE_GOV_API_KEY', 'CODE_GOV_TASKS_URL']), |
228 | 225 | new CleanWebpackPlugin([OUTPUT_PATH], { root: rootDir }), |
229 | 226 | new CopyWebpackPlugin(patterns), |
| 227 | + new ImageminPlugin({ test: /\.(jpe?g|png|gif|svg)$/i }), |
230 | 228 | new HtmlWebpackPlugin({ |
231 | 229 | hash: true, |
232 | 230 | template: 'index.html', |
|
0 commit comments