-
Notifications
You must be signed in to change notification settings - Fork 30
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
Optimizing the chunk size using devtool #1520
Optimizing the chunk size using devtool #1520
Conversation
webpack.config.ts
Outdated
// 'named' Readable ids for better debugging. | ||
chunkIds: isProduction ? 'deterministic' : 'named', | ||
}, | ||
devServer: { |
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.
Moved devServer at the bottom for better readability
package.json
Outdated
"clean": "yarn clean-mco && yarn clean-odf", | ||
"clean-mco": "cd plugins/mco && rm -rf ./dist", | ||
"clean-odf": "cd plugins/odf && rm -rf ./dist", | ||
"clean-client": "cd plugins/client && rm -rf ./dist", |
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.
why we removing this ?? We use them atleast on local.
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.
webpack config: clean: true, will takecare of this for both Prod and dev
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.
The clean config is not working always, I am also facing same issue:webpack/webpack-dev-middleware#861
i will revert this change
webpack.config.ts
Outdated
filename: '[name].bundle.[contenthash:8].js', | ||
chunkFilename: '[name].[contenthash:8].js', | ||
// Clean the output directory(dist) before emit | ||
clean: true, |
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.
this might be not enough to enable caching... manifest file (plugin metadata) has a constant name which can get cached, IIRC console rely on version
field to prevent that.
We need to confirm with OCP team though once, whether that fix will work or not, then update our version accordingly for main and compatibility builds (if not already).
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.
ack
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.
Validation on the odf-console side:
After the base path is changed the version is updated on the manifest json,
For the main branch: "version": "4.17.0",
For the compatibility branch: "version": "4.17.0-compatibility",
So we are good for further testing. Will check with OCP team and update here.
@@ -153,13 +144,34 @@ const config: webpack.Configuration & DevServerConfiguration = { | |||
cwd: process.cwd(), | |||
}), | |||
], | |||
devtool: 'eval-cheap-module-source-map', | |||
// 'source-map' is recommended choice for production builds, A full SourceMap is emitted as a separate file. |
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.
we don't need source for production, it will unnecessary increase the bundle size...
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.
maybe I am missing something here ??
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.
I thought the same but one corner case here is, in case of any bug in production we don't get any stack trace for debugging the issue.
/test odf-console-e2e-aws |
@GowthamShanmugam if we are planning to backport this PR to 4.16.z can we remove hashing and other unrelated changes from this PR and add them to #1525 instead ?? Let's keep this PR short with only what's needed ( In case this is 4.17 onwards fix then we are good. |
ack, that's a good suggestion |
Signed-off-by: Gowtham Shanmugasundaram <[email protected]>
7f82493
to
eeb5882
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: GowthamShanmugam, SanjalKatiyar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-4.17 |
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.17 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick release-4.17-compatibility |
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.17-compatibility in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick release-4.16 |
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.16 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/cherry-pick release-4.16-compatibility |
@SanjalKatiyar: once the present PR merges, I will cherry-pick it on top of release-4.16-compatibility in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test odf-console-e2e-aws |
3681bf0
into
red-hat-storage:master
@SanjalKatiyar: new pull request created: #1534 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@SanjalKatiyar: new pull request created: #1536 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@SanjalKatiyar: #1520 failed to apply on top of branch "release-4.16":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@SanjalKatiyar: #1520 failed to apply on top of branch "release-4.16-compatibility":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Issues: https://issues.redhat.com/browse/RHSTOR-6134
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2290675