Commit 34c70ca7 by Torkel Ödegaard

fix for issue with error view in production builds

parent cab2c518
...@@ -115,6 +115,7 @@ func Recovery() macaron.Handler { ...@@ -115,6 +115,7 @@ func Recovery() macaron.Handler {
c.Data["Title"] = "Server Error" c.Data["Title"] = "Server Error"
c.Data["AppSubUrl"] = setting.AppSubUrl c.Data["AppSubUrl"] = setting.AppSubUrl
c.Data["Theme"] = setting.DefaultTheme
if setting.Env == setting.DEV { if setting.Env == setting.DEV {
if theErr, ok := err.(error); ok { if theErr, ok := err.(error); ok {
......
...@@ -85,7 +85,7 @@ module.exports = merge(common, { ...@@ -85,7 +85,7 @@ module.exports = merge(common, {
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/error.html'), filename: path.resolve(__dirname, '../../public/views/error.html'),
template: path.resolve(__dirname, '../../public/views/error-template.html'), template: path.resolve(__dirname, '../../public/views/error-template.html'),
inject: 'false', inject: false,
}), }),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/index.html'), filename: path.resolve(__dirname, '../../public/views/index.html'),
......
...@@ -75,16 +75,16 @@ module.exports = merge(common, { ...@@ -75,16 +75,16 @@ module.exports = merge(common, {
}), }),
new ngAnnotatePlugin(), new ngAnnotatePlugin(),
new HtmlWebpackPlugin({ 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'), 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'),
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment