-
Notifications
You must be signed in to change notification settings - Fork 504
Open
Labels
Description
Describe the bug
When server.ts encounters a breaking exception, it attempts to log a traceback showing the line where it occurred.
Because dist/server/main.js is minified basically the entire file gets printed to the log.
To Reproduce
Steps to reproduce the behavior:
- Add
throw new Error('hello world')anywhere in the body ofserver.tsto simulate an uncaught error - Rebuild with
yarn build:prod - Start with
yarn serve:ssr- You'll see a ton of JavaScript in your log
- There will be no way to determine what actually went wrong
Expected behavior
Logs should not be flooded this much when the production server breaks
Workaround
Disable minification in webpack.prod.ts
module.exports = Object.assign({}, commonExports, {
...
optimization: {
minimize: false,
},
});This may be acceptable in general, as it only affects dist/server/main.js, so we probably don't need the minimization for the space savings at least.
Not sure if there are any other performance benefits besides this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
📋 To Do