const path = require('path'); module.exports = { entry: path.resolve(__dirname, 'src', 'index.js'), output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist'), }, module: { rules: [ // sass support with `import './styles.scss'` { test: /\.s[ac]ss$/i, use: ['style-loader', 'css-loader', 'sass-loader'], }, // css support with `import './styles.css'` { test: /\.css$/i, use: ['style-loader', 'css-loader'], }, // image support with `import Image from './image.png'` { test: /\.(png|svg|jpg|jpeg|gif)$/i, type: 'asset/resource', }, ], }, };