bigbuffet-rw/webpack/rules/css.ts

32 lines
574 B
TypeScript
Raw Normal View History

2022-10-14 13:43:32 -07:00
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
2020-03-27 13:59:38 -07:00
2022-10-14 13:43:32 -07:00
import type { RuleSetRule } from 'webpack';
const rule: RuleSetRule = {
2020-03-27 13:59:38 -07:00
test: /\.s?css$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true,
importLoaders: 2,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
implementation: require('sass'),
sourceMap: true,
},
},
],
};
2022-10-14 13:43:32 -07:00
export default rule;