-
Notifications
You must be signed in to change notification settings - Fork 244
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
Make the CLI bundle analysis compatible with older Remix versions that don't output a metafile #1357
Conversation
…t don't output a metafile
@@ -66,7 +75,7 @@ export async function getBundleAnalysisSummary(bundlePath: string) { | |||
.split('\n') | |||
.filter((line) => { | |||
const match = line.match( | |||
/(.*)\/node_modules\/(react-dom|@remix-run|@shopify\/hydrogen|react-router|react-router-dom)\/(.*)/g, | |||
/(.*)(node_modules\/|server-assets-manifest:|server-entry-module:)(react-dom|@remix-run|@shopify\/hydrogen|react-router|react-router-dom)\/(.*)/g, |
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.
An unrelated fix to the Regular expression hiding in the bundle summary Remix/React and other dependencies that are always present.
sizeMB: number, | ||
bundleStats: boolean, | ||
remixConfig: RemixConfig, | ||
) { |
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.
All the bundle analysis logic is moved in here, and only executed if the metafile exists
buildPathWorkerFile: string, | ||
sizeMB: number, | ||
remixConfig: RemixConfig, | ||
) { |
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.
If it doesn't exist, output this simple status, which is essentially what the CLI did prior to the new bundle analytics.
WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
HOW to test your changes?
Post-merge steps
Checklist