mirror of
https://github.com/grafana/grafana.git
synced 2025-09-18 00:43:29 +08:00

* build(webpack): set publicpath and process urls to resolve assets correctly * build(webpack): add back --progress to build * Add local cdn (cherry picked from commit 7a19523fa476fd5ff2d7669d116f5be462b100f5) * chore(devenv): fix local_cdn path in ngnix conf * chore(codeowners): add frontend-ops as owners of local_cdn docker block --------- Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
42 lines
840 B
JavaScript
42 lines
840 B
JavaScript
'use strict';
|
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = function (options) {
|
|
return {
|
|
test: /\.(sa|sc|c)ss$/,
|
|
use: [
|
|
{
|
|
loader: MiniCssExtractPlugin.loader,
|
|
options: {
|
|
publicPath: './',
|
|
},
|
|
},
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
importLoaders: 2,
|
|
url: options.preserveUrl,
|
|
sourceMap: options.sourceMap,
|
|
},
|
|
},
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
sourceMap: options.sourceMap,
|
|
postcssOptions: {
|
|
config: path.resolve(__dirname),
|
|
},
|
|
},
|
|
},
|
|
{
|
|
loader: 'sass-loader',
|
|
options: {
|
|
sourceMap: options.sourceMap,
|
|
},
|
|
},
|
|
],
|
|
};
|
|
};
|