Toolkit: Resolve external fonts when Grafana is served from a sub path(#35352)

This commit is contained in:
Jack Westbrook 2021-06-08 16:44:57 +02:00 committed by GitHub
parent 1f5a28ec63
commit 044acf727b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,8 @@ export const getFileLoaders = () => {
test: /\.(woff|woff2|eot|ttf|otf)(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
options: {
publicPath: `/public/plugins/${getPluginId()}/fonts`,
// Keep publicPath relative for host.com/grafana/ deployments
publicPath: `public/plugins/${getPluginId()}/fonts`,
outputPath: 'fonts',
name: '[name].[ext]',
},