grafana/scripts/webpack/sass.rule.js
Torkel Ödegaard 2e59166daa
Fix: Autoprefixer is now working (#16351)
The autoprefixer not working broke the phantomjs backend png rendering

Fixes #16345
2019-04-02 18:15:30 +02:00

34 lines
668 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
},
},
],
};
};