css and image support

This commit is contained in:
Michael Peters 2023-01-09 14:56:10 -08:00
parent 6a41593013
commit c71e62246e

View File

@ -8,10 +8,21 @@ module.exports = {
}, },
module: { module: {
rules: [ rules: [
// sass support with `import './styles.scss'`
{ {
test: /\.s[ac]ss$/i, test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'], 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',
},
], ],
}, },
}; };