soapbox/webpack/rules/css.ts

32 wiersze
574 B
TypeScript
Czysty Zwykły widok Historia

2022-10-14 20:43:32 +00:00
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
2020-03-27 20:59:38 +00:00
2022-10-14 20:43:32 +00:00
import type { RuleSetRule } from 'webpack';
const rule: RuleSetRule = {
2020-03-27 20:59:38 +00: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 20:43:32 +00:00
export default rule;