mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana/toolkit: Fix incorrect image and font generation for plugin builds (#52927)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
import { getPluginId } from '../utils/getPluginId';
|
||||
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
const supportedExtensions = ['css', 'scss', 'less', 'sass'];
|
||||
@@ -109,7 +111,7 @@ export const getFileLoaders = () => {
|
||||
test: /\.(png|jpe?g|gif|svg)$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
publicPath: `img/`,
|
||||
publicPath: `public/plugins/${getPluginId()}/img/`,
|
||||
outputPath: 'img/',
|
||||
},
|
||||
},
|
||||
@@ -117,7 +119,7 @@ export const getFileLoaders = () => {
|
||||
test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
publicPath: `fonts/`,
|
||||
publicPath: `public/plugins/${getPluginId()}/fonts/`,
|
||||
outputPath: 'fonts/',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user