-
Notifications
You must be signed in to change notification settings - Fork 2k
Stats - Generate sourcemaps for the odyssey app #102831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
@@ -22,6 +22,7 @@ const shouldEmitStats = process.env.EMIT_STATS && process.env.EMIT_STATS !== 'fa | |||
const isDevelopment = process.env.NODE_ENV !== 'production'; | |||
const outBasePath = process.env.STATS_PACKAGE_PATH ? process.env.STATS_PACKAGE_PATH : __dirname; | |||
const outputPath = path.join( outBasePath, 'dist' ); | |||
const sourceMap = isDevelopment ? 'source-map' : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, enabling this for development mode only, but I believe this could be enabled by default
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to generate sourcemaps for the Odyssey app development builds, which will ease the debugging process.
- Introduces a conditional configuration for sourcemap generation based on the environment (development vs production).
- Updates the webpack configuration to use the new sourcemap setting.
Comments suppressed due to low confidence (1)
apps/odyssey-stats/webpack.config.js:25
- [nitpick] Consider renaming 'sourceMap' to 'devtoolConfig' or a similar name to clarify that it represents a webpack configuration value for the devtool option.
const sourceMap = isDevelopment ? 'source-map' : false;
Related to #
Proposed Changes
Why are these changes being made?
Testing Instructions
Pre-merge Checklist