mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
35 lines
730 B
JavaScript
35 lines
730 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,
|
|
minimize: options.minimize,
|
|
},
|
|
},
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
sourceMap: options.sourceMap,
|
|
config: { path: __dirname + '/postcss.config.js' },
|
|
},
|
|
},
|
|
{
|
|
loader: 'sass-loader',
|
|
options: {
|
|
sourceMap: options.sourceMap
|
|
},
|
|
},
|
|
],
|
|
};
|
|
};
|