| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions. |
Sorry, something went wrong.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Sorry, something went wrong.
because the last line doesn't always have a `\n` and `create-react-app` is leaving the last line of the stack traces present in the error messages
|
Also fixed an issue where the last line of the stack trace is left in the message because it doesn't end with \n. |
Sorry, something went wrong.
|
Can you add a comment explaining the exception to future readers? |
Sorry, something went wrong.
|
Sure. How's that look? |
Sorry, something went wrong.
|
Looks great. |
Sorry, something went wrong.
* master: (30 commits) Relax peerDependencies for ESLint preset (react#1191) Update Webpack to fix source map issues (react#1188) Update webpack prod config (react#1181) Chrome 'open tab' reuse an empty tab when possible (react#1165) Use file-loader for svgs (react#1180) Fix Babel issues in tests by applying the right transforms (react#1179) [babel-preset-react-app] Temporary fix missing babel plugins (react#1177) Add Subresource Integrity support (react#1176) Remove path module from webpack config on eject. (react#1175) Don't strip stack traces of evaluated webpack bundles (react#1050) Add deploy to Firebase CDN on template's README (Closes react#374) (react#1143) Update e2e.sh (react#1167) Document what npm build does and pushState (react#933) Fix minor typo/grammar (react#1099) Add "npm run build silently fails" to Troubleshooting (react#1168) Add testURL to jest config (react#1120) Make jsx-no-undef rule an error (react#1159) Update CHANGELOG.md Publish Update changelog for 0.8.1 ...
* Don't strip stack traces of evaluated webpack code * Strip stack traces at the end of a string because the last line doesn't always have a `\n` and `create-react-app` is leaving the last line of the stack traces present in the error messages * code comment * code comment
* Don't strip stack traces of evaluated webpack code * Strip stack traces at the end of a string because the last line doesn't always have a `\n` and `create-react-app` is leaving the last line of the stack traces present in the error messages * code comment * code comment
| Back | FazBrowse Home | New Git URL |
formatWebpackMessages is neat! I'm using it outside of create-react-app. However, it's a little too eager in stripping stack traces from messages.
I'm using the static-react-render-webpack-plugin which evaluates the outputted webpack bundle. When evaluating the outputted webpack bundle throws (in the user's code), the user needs the stack trace to debug what went wrong. formatWebpackMessages is stripping all stack traces making that difficult.
This PR excludes stack traces where the source path contains webpack:. I've created a demo of the regexp working which shows stack traces being stripped for babel-loader but not static-react-render-webpack-plugin.
Example stack tracestatic-react-render-webpack-plugin: Error rendering page "scripts/components/compare/couples.js": ReferenceError: Foobar is not defined at Couples (webpack:///./components/compare/couples/index.jsx?:37:5) at eval (webpack:///../~/react/lib/ReactCompositeComponent.js?:305:16) at measureLifeCyclePerf (webpack:///../~/react/lib/ReactCompositeComponent.js?:74:12) at ReactCompositeComponentMixin._constructComponentWithoutOwner (webpack:///../~/react/lib/ReactCompositeComponent.js?:304:14) at ReactCompositeComponentMixin._constructComponent (webpack:///../~/react/lib/ReactCompositeComponent.js?:279:21) at ReactCompositeComponentMixin.mountComponent (webpack:///../~/react/lib/ReactCompositeComponent.js?:187:21) at Object.ReactReconciler.mountComponent (webpack:///../~/react/lib/ReactReconciler.js?:47:35) at ReactDOMComponent.ReactMultiChild.Mixin.mountChildren (webpack:///../~/react/lib/ReactMultiChild.js?:240:44) at ReactDOMComponent.Mixin._createContentMarkup (webpack:///../~/react/lib/ReactDOMComponent.js?:661:32) at ReactDOMComponent.Mixin.mountComponent (webpack:///../~/react/lib/ReactDOMComponent.js?:528:29)