mirror of
https://github.com/grafana/grafana.git
synced 2025-09-19 23:14:25 +08:00
Load hash based styles in error.html, too
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,6 +8,7 @@ awsconfig
|
|||||||
/dist
|
/dist
|
||||||
/public/build
|
/public/build
|
||||||
/public/views/index.html
|
/public/views/index.html
|
||||||
|
/public/views/error.html
|
||||||
/emails/dist
|
/emails/dist
|
||||||
/public_gen
|
/public_gen
|
||||||
/public/vendor/npm
|
/public/vendor/npm
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<base href="[[.AppSubUrl]]/" />
|
<base href="[[.AppSubUrl]]/" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="public/build/grafana.[[ .Theme ]].css?v[[ .BuildVersion ]]">
|
<link rel="stylesheet" href="public/build/grafana.[[ .Theme ]].<%= webpack.hash %>.css">
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="public/img/fav32.png">
|
<link rel="icon" type="image/png" href="public/img/fav32.png">
|
||||||
<link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28">
|
<link rel="mask-icon" href="public/img/grafana_mask_icon.svg" color="#F05A28">
|
@ -47,7 +47,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.html$/,
|
test: /\.html$/,
|
||||||
exclude: /index\.template.html/,
|
exclude: /(index|error)\.template\.html/,
|
||||||
use: [
|
use: [
|
||||||
{ loader: 'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname, '../../public')) + '&prefix=public' },
|
{ loader: 'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname, '../../public')) + '&prefix=public' },
|
||||||
{
|
{
|
||||||
|
@ -82,6 +82,11 @@ module.exports = merge(common, {
|
|||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: "grafana.[name].[hash].css"
|
filename: "grafana.[name].[hash].css"
|
||||||
}),
|
}),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: path.resolve(__dirname, '../../public/views/error.html'),
|
||||||
|
template: path.resolve(__dirname, '../../public/views/error.template.html'),
|
||||||
|
inject: 'false',
|
||||||
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
filename: path.resolve(__dirname, '../../public/views/index.html'),
|
filename: path.resolve(__dirname, '../../public/views/index.html'),
|
||||||
template: path.resolve(__dirname, '../../public/views/index.template.html'),
|
template: path.resolve(__dirname, '../../public/views/index.template.html'),
|
||||||
|
@ -80,6 +80,11 @@ module.exports = merge(common, {
|
|||||||
inject: 'body',
|
inject: 'body',
|
||||||
chunks: ['vendor', 'app'],
|
chunks: ['vendor', 'app'],
|
||||||
}),
|
}),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: path.resolve(__dirname, '../../public/views/error.html'),
|
||||||
|
template: path.resolve(__dirname, '../../public/views/error.template.html'),
|
||||||
|
inject: false,
|
||||||
|
}),
|
||||||
function () {
|
function () {
|
||||||
this.hooks.done.tap('Done', function (stats) {
|
this.hooks.done.tap('Done', function (stats) {
|
||||||
if (stats.compilation.errors && stats.compilation.errors.length) {
|
if (stats.compilation.errors && stats.compilation.errors.length) {
|
||||||
|
Reference in New Issue
Block a user