From c71e62246e08ca6ccedd6183f4adcc4e99c2141d Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Mon, 9 Jan 2023 14:56:10 -0800 Subject: [PATCH] css and image support --- webpack.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 90c2cb1..bb726b0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,10 +8,21 @@ module.exports = { }, 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: /\.s[ac]ss$/i, + use: ['style-loader', 'css-loader'], + }, + // image support with `import Image from './image.png'` + { + test: /\.(png|svg|jpg|jpeg|gif)$/i, + type: 'asset/resource', + }, ], }, };