export function buildLoaders(options: BuildOptions): RuleSetRule[] {
const cssLoader = {
test: /\.s[ac]ss$/i,
use: [
options.isDev ? 'style-loader' : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
modules: true,
},
},
'sass-loader',
],
};
const typeLoader = {
test: /\.tsx?$/,
use: ['ts-loader'],
exclude: /node_modules/,
};
return [typeLoader, cssLoader];
}