grafana/scripts/webpack/sass.rule.js
Torkel Ödegaard 1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00

34 lines
671 B
JavaScript

'use strict';
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = function (options) {
return {
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
importLoaders: 2,
url: options.preserveUrl,
sourceMap: options.sourceMap,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap,
config: { path: __dirname },
},
},
{
loader: 'sass-loader',
options: {
sourceMap: options.sourceMap,
},
},
],
};
};