Skip to content
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

Feature: Update babel-loader webpack config to have caching support for faster builds #452

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

gagan0123
Copy link
Collaborator

@gagan0123 gagan0123 commented Jan 24, 2024

Description

This PR aims to improve the build performance of our Webpack configuration by implementing caching for the Babel loader. By enabling this feature, we expect to see a significant reduction in build times, particularly during development, as Babel will be able to reuse previously computed results instead of reprocessing files from scratch on every build.

Relevant Technical Choices

  • Enabled caching in the Babel loader configuration within our Webpack setup.

Testing Instructions

To verify the effectiveness of this change:

  1. Perform a clean build of the project and note the build time.
  2. Make a minor change in one of the JavaScript/TypeScript files.
  3. Rebuild the project and observe the build time. There should be a noticeable reduction in build time compared to the initial build.
  4. Ensure that the application still runs as expected and that there are no build-related errors.

Additional Information:

This change is a straightforward enhancement aimed at improving developer experience by reducing waiting times during the build process when switching between branches. It does not introduce any new dependencies or major changes to our build configuration.


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

@gagan0123 gagan0123 requested a review from mohdsayed January 24, 2024 16:57
@gagan0123 gagan0123 marked this pull request as draft January 24, 2024 16:57
@gagan0123 gagan0123 changed the base branch from main to develop January 24, 2024 20:58
@gagan0123 gagan0123 changed the base branch from develop to main January 24, 2024 20:58
@mohdsayed
Copy link
Collaborator

@gagan0123 Good find, however, I wouldn't want to try this near a release. Let's try it in the develop branch after v0.5 to see how it works

Related comments: babel/babel-loader#199 (comment), babel/babel-loader#351 (comment)

@gagan0123 gagan0123 changed the base branch from main to develop January 25, 2024 06:28
@gagan0123 gagan0123 changed the base branch from develop to main January 25, 2024 06:29
@gagan0123 gagan0123 changed the base branch from main to develop January 25, 2024 06:30
@gagan0123 gagan0123 changed the base branch from develop to main January 25, 2024 07:51
@gagan0123 gagan0123 changed the base branch from main to develop January 25, 2024 07:51
@gagan0123 gagan0123 force-pushed the feat/babel-loader-webpack-caching branch from 439ca70 to 184d81a Compare January 25, 2024 08:44
@gagan0123
Copy link
Collaborator Author

Created new branch, cherry-picked my commit, then force pushed to this, so as to isolate it from other changes that were being displayed, now its ready for review and merge to develop

@gagan0123 gagan0123 marked this pull request as ready for review January 25, 2024 08:46
@gagan0123
Copy link
Collaborator Author

cc @mohdsayed

@gagan0123
Copy link
Collaborator Author

@mohdsayed

Anything else that needs to be added in this PR?

@mohdsayed
Copy link
Collaborator

@mohdsayed

Anything else that needs to be added in this PR?

That's all for post v0.5 merge

#452 (comment)

@gagan0123
Copy link
Collaborator Author

📝 Noted

We can assign this to QA after 0.5 release 🚀

@fellyph
Copy link
Collaborator

fellyph commented Mar 7, 2024

QA DONE: LGTM

I have tested all the scripts:

  • build
  • test
  • cli
  • dev

And run the extension and test a few audits

Copy link
Collaborator

@mohdsayed mohdsayed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this long pending PR.

cc: @mayan-000 , @amovar18 , @ayushnirwal

@mohdsayed mohdsayed added this to the v1.0.0 milestone Apr 26, 2024
@mohdsayed mohdsayed merged commit f918e3b into develop Apr 26, 2024
4 checks passed
@mohdsayed mohdsayed deleted the feat/babel-loader-webpack-caching branch April 26, 2024 07:19
@mohdsayed mohdsayed mentioned this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants