@kaliber/build 0.0.121 → 0.0.122

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/serve.js +3 -1
  2. package/package.json +1 -1
package/lib/serve.js CHANGED
@@ -8,7 +8,7 @@ const morgan = require('morgan')
8
8
 
9
9
  const templateRenderers = require('./getTemplateRenderers')
10
10
 
11
- const { kaliber: { serveMiddleware, helmetOptions, publicPath = '/' } = {} } = require('@kaliber/config')
11
+ const { kaliber: { serveMiddleware, helmetOptions, publicPath = '/', reportError } = {} } = require('@kaliber/config')
12
12
 
13
13
  const recognizedTemplates = Object.keys(templateRenderers)
14
14
  const blockedTemplateFiles = recognizedTemplates.reduce(
@@ -59,6 +59,8 @@ app.use((err, req, res, next) => {
59
59
  if (!err) return next()
60
60
 
61
61
  console.error(err)
62
+ if (reportError) reportError(err)
63
+
62
64
  const response = res.status(500)
63
65
  if (isProduction) {
64
66
  findFile(req.path, internalServerError)
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.121",
2
+ "version": "0.0.122",
3
3
  "name": "@kaliber/build",
4
4
  "description": "Zero configuration, opinionated webpack / react build setup",
5
5
  "scripts": {