diff --git a/.gitignore b/.gitignore index 21083741e14..05ae4907e89 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ awsconfig /dist /public/build /public/views/index.html +/public/views/error.html /emails/dist /public_gen /public/vendor/npm diff --git a/public/views/error.html b/public/views/error.template.html similarity index 98% rename from public/views/error.html rename to public/views/error.template.html index 5c51e28eff4..af430fc6c3d 100644 --- a/public/views/error.html +++ b/public/views/error.template.html @@ -10,7 +10,7 @@ - + diff --git a/scripts/webpack/webpack.common.js b/scripts/webpack/webpack.common.js index dc4a7f363a2..7da6c3559bf 100644 --- a/scripts/webpack/webpack.common.js +++ b/scripts/webpack/webpack.common.js @@ -47,7 +47,7 @@ module.exports = { }, { test: /\.html$/, - exclude: /index\.template.html/, + exclude: /(index|error)\.template\.html/, use: [ { loader: 'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname, '../../public')) + '&prefix=public' }, { diff --git a/scripts/webpack/webpack.dev.js b/scripts/webpack/webpack.dev.js index 5cef1b6afd4..456cc277f2f 100644 --- a/scripts/webpack/webpack.dev.js +++ b/scripts/webpack/webpack.dev.js @@ -82,6 +82,11 @@ module.exports = merge(common, { new MiniCssExtractPlugin({ 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({ filename: path.resolve(__dirname, '../../public/views/index.html'), template: path.resolve(__dirname, '../../public/views/index.template.html'), diff --git a/scripts/webpack/webpack.prod.js b/scripts/webpack/webpack.prod.js index 761d22892ea..c4b4b27245e 100644 --- a/scripts/webpack/webpack.prod.js +++ b/scripts/webpack/webpack.prod.js @@ -80,6 +80,11 @@ module.exports = merge(common, { inject: 'body', 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 () { this.hooks.done.tap('Done', function (stats) { if (stats.compilation.errors && stats.compilation.errors.length) {