1npm install --save-dev file-loader
2
3 const path = require('path');
4
5 module.exports = {
6 entry: './src/index.js',
7 output: {
8 filename: 'bundle.js',
9 path: path.resolve(__dirname, 'dist'),
10 },
11 module: {
12 rules: [
13 {
14 test: /\.css$/,
15 use: [
16 'style-loader',
17 'css-loader'
18 ],
19 },
20+ {
21+ test: /\.(png|svg|jpg|gif)$/,
22+ use: [
23+ 'file-loader',
24+ ],
25+ },
26 ],
27 },
28 };