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

fix(webpack): remove unused babel cache #926

Merged
merged 6 commits into from
Apr 22, 2022

Conversation

chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Apr 21, 2022

PR Details

We already provide the webpack cache, there are practically no scenarios where the babel cache is hit (the webpack cache is hit first), and calculating the babel cache introduces some overhead, so we remove the babel cache related code.

This has been verified to have no impact on cold start/hot start performance.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated changeset
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@cla-bot cla-bot bot added the cla-signed label Apr 21, 2022
@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2022

🦋 Changeset detected

Latest commit: a524ad5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@modern-js/webpack Patch
@modern-js/plugin-docsite Patch
@modern-js/plugin-nocode Patch
@modern-js/plugin-storybook Patch
@modern-js/plugin-testing Patch
@modern-js/testing Patch
@modern-js/app-tools Patch
@modern-js/testing-plugin-bff Patch
basic-module Patch
composes-basic Patch
composes-external Patch
dev-module Patch
diff-suffix-module Patch
global-module Patch
prod-module Patch
css Patch
antd-less Patch
bad-nested-npm-import Patch
bad-npm-import Patch
base-import Patch
css-ts-declaration Patch
disable-source-map Patch
exclude-less Patch
exclude-sass Patch
import-common-css Patch
inline-css-url Patch
keep-css-url Patch
less-import Patch
less-inline-js Patch
less-npm-import Patch
multi-less Patch
multi-sass Patch
nested-npm-import Patch
npm-import Patch
single-less Patch
single-sass Patch
tips-to-install-less-plugin Patch
css-modules Patch
use-loader Patch
@modern-js/plugin-tailwindcss Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #926 (a524ad5) into main (a0475f1) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #926      +/-   ##
==========================================
- Coverage   59.75%   59.75%   -0.01%     
==========================================
  Files         820      818       -2     
  Lines       35066    35012      -54     
  Branches     6544     6535       -9     
==========================================
- Hits        20955    20920      -35     
+ Misses      14075    14056      -19     
  Partials       36       36              
Impacted Files Coverage Δ
packages/cli/webpack/src/config/base.ts 91.80% <ø> (ø)
packages/toolkit/utils/src/index.ts 100.00% <ø> (ø)
packages/cli/webpack/src/utils/getBabelOptions.ts 100.00% <100.00%> (ø)
...ackages/cli/webpack/src/utils/getWebpackAliases.ts 100.00% <100.00%> (+11.42%) ⬆️
packages/toolkit/utils/src/is/index.ts 100.00% <0.00%> (+9.43%) ⬆️
packages/toolkit/utils/src/alias.ts 98.18% <0.00%> (+18.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0475f1...a524ad5. Read the comment docs.

@chenjiahan chenjiahan merged commit 7152662 into web-infra-dev:main Apr 22, 2022
@chenjiahan chenjiahan deleted the remove_babel_cache_0421 branch April 22, 2022 07:17
targeral pushed a commit that referenced this pull request Jun 10, 2022
* fix: remove unused babel cache

* test: add test case

* test: add more cases

* test: add more cases

* test: add alias test cases
targeral pushed a commit that referenced this pull request Jun 10, 2022
* fix: remove unused babel cache

* test: add test case

* test: add more cases

* test: add more cases

* test: add alias test cases
targeral pushed a commit that referenced this pull request Jun 10, 2022
* fix: remove unused babel cache

* test: add test case

* test: add more cases

* test: add more cases

* test: add alias test cases
targeral pushed a commit that referenced this pull request Jul 15, 2022
* fix: remove unused babel cache

* test: add test case

* test: add more cases

* test: add more cases

* test: add alias test cases
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.

None yet

2 participants