GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add source maps by jasonwilliams · Pull Request #21946 · react/react Conversation
Contributor
Fixes #20186 SummaryAttempts to get sourcemaps working. Status:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
0xdevalias
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A rather verbose review + deep dive research into the context of why certain changes were made here, as well as potential solutions for what I believe are the remaining issues that would block this PR from landing. At least in theory, I think all of the potential issues have solutions now. Would love to see this work able to land! There are a few minor code cleanup 'suggestions' as well, which can all be automatically applied as a single commit as follows:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There seem to be a bunch of places where the comment
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
-378
to
+397
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was It looks like the old version of the library removed it in
Looking at the options for the new library, these are the parts that seem potentially relevant:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+378
to
+391
|
| __VARIANT__: bundle.enableNewReconciler === true, | ||
| }, | ||
| }), | ||
| // // Shim any modules that need forking in this environment. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| // // Shim any modules that need forking in this environment. | |
| // Shim any modules that need forking in this environment. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // // Shim any modules that need forking in this environment. | ||
| useForks(forks), | ||
| // Ensure we don't try to bundle any fbjs modules. | ||
| // // Ensure we don't try to bundle any fbjs modules. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| // // Ensure we don't try to bundle any fbjs modules. | |
| // Ensure we don't try to bundle any fbjs modules. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| babelHelpers: 'bundled', | ||
| babelrc: false, | ||
| configFile: false, | ||
| sourceMaps: true, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It looks like @rollup/plugin-babel generates sourcemaps by default since 2.1.0:
So we probably don't need to add this (unless it's also going to other plugins that don't set it by default?)
| sourceMaps: true, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| "@rollup/plugin-replace": "^2.4.2", | ||
| "@rollup/plugin-commonjs": "19.0.1", | ||
| "@rollup/plugin-node-resolve": "^13.0.1", | ||
| "@rollup/plugin-babel": "^5.3.0", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Latest versions:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| "rollup": "^2.53.2", | ||
| "rollup-plugin-prettier": "^2.1.0", | ||
| "rollup-plugin-strip-banner": "^2.0.0", | ||
| "rollup-plugin-terser": "^7.0.2", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Latest versions:
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| interop: false, | ||
| name: globalName, | ||
| sourcemap: false, | ||
| sourcemap: !isPretty, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in another comment in this review, I think maybe we should be using shouldStayReadable here directly, since the only time where we (currently) wouldn't be generating sourcemaps (to my knowledge) is when prettier is called (though personally, if it doesn't change the build time dramatically, I would be potentially inclined to keep it enabled even then)
| sourcemap: !isPretty, | |
| sourcemap: !shouldStayReadable, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| skip: externals, | ||
| }), | ||
| // Remove license headers from individual modules | ||
| // // Use Node resolution mechanism. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| // // Use Node resolution mechanism. | |
| // Use Node resolution mechanism. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Update Rollup and related plugins to their most recent versions + resolve any breaking changes/deprecations/etc along the way. I made each change piece by piece, so the commit history tells a pretty good story of what was changed where/how/why. fixes #24894 For the full deepdive/context, see: - #24894 The inspiration for this came from @jasonwilliams 's PR for attempting to add sourcemap output support to React's builds: - #20186 - #21946 But I figured that it would be useful to minimise the scope of changes in that PR, and to modernise the build tooling along the way. If any of these updates rely on a node version later than `10.x`, then the following PR may have to land first, otherwise things might break on AppVeyor: - #24891 - #24892 Co-authored-by: Sebastian Markbage <[email protected]>
Update Rollup and related plugins to their most recent versions + resolve any breaking changes/deprecations/etc along the way. I made each change piece by piece, so the commit history tells a pretty good story of what was changed where/how/why. fixes #24894 For the full deepdive/context, see: - #24894 The inspiration for this came from @jasonwilliams 's PR for attempting to add sourcemap output support to React's builds: - #20186 - #21946 But I figured that it would be useful to minimise the scope of changes in that PR, and to modernise the build tooling along the way. If any of these updates rely on a node version later than `10.x`, then the following PR may have to land first, otherwise things might break on AppVeyor: - #24891 - #24892 Co-authored-by: Sebastian Markbage <[email protected]> DiffTrain build for [6b6d061](6b6d061) [View git log for this commit](https://github.com/facebook/react/commits/6b6d0617eff48860c5b4e3e79c74cbd3312cf45a)
|
It looks like the work done in the following PR is likely to supercede and replace this PR: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Since the above PR (#26446) has been merged, this PR is now obsolete, and can probably be closed out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Update Rollup and related plugins to their most recent versions + resolve any breaking changes/deprecations/etc along the way. I made each change piece by piece, so the commit history tells a pretty good story of what was changed where/how/why. fixes react/react#24894 For the full deepdive/context, see: - react/react#24894 The inspiration for this came from @jasonwilliams 's PR for attempting to add sourcemap output support to React's builds: - react/react#20186 - react/react#21946 But I figured that it would be useful to minimise the scope of changes in that PR, and to modernise the build tooling along the way. If any of these updates rely on a node version later than `10.x`, then the following PR may have to land first, otherwise things might break on AppVeyor: - react/react#24891 - react/react#24892 Co-authored-by: Sebastian Markbage <[email protected]> DiffTrain build for [6b6d0617eff48860c5b4e3e79c74cbd3312cf45a](react/react@6b6d061) [View git log for this commit](https://github.com/facebook/react/commits/6b6d0617eff48860c5b4e3e79c74cbd3312cf45a)
|
Resolved in #26446 Thank you @jasonwilliams for starting this effort 👍🏻 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t#24916) Update Rollup and related plugins to their most recent versions + resolve any breaking changes/deprecations/etc along the way. I made each change piece by piece, so the commit history tells a pretty good story of what was changed where/how/why. fixes react#24894 For the full deepdive/context, see: - react#24894 The inspiration for this came from @jasonwilliams 's PR for attempting to add sourcemap output support to React's builds: - react#20186 - react#21946 But I figured that it would be useful to minimise the scope of changes in that PR, and to modernise the build tooling along the way. If any of these updates rely on a node version later than `10.x`, then the following PR may have to land first, otherwise things might break on AppVeyor: - react#24891 - react#24892 Co-authored-by: Sebastian Markbage <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Distribute source maps for easier debugging in Chrome's Performance tab
There was an error while loading. Please reload this page.