Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1050

Don't strip stack traces of evaluated webpack bundles

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jameslnewell/master into master Nov 17, 2016
  • Overview 7
  • Commits 4
  • Pipelines 0
  • Changes 1

Created by: jameslnewell

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 trace
static-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)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jameslnewell/master