webpack / webpack/webpack-doc-kit
fix: reuse complete webpack source caches
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 22
- Forks
- 88
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 12
Description
Which area is affected?
Build tooling (scripts, plugins)
Bug description
Every documentation build downloads and extracts all webpack packages again, even when the same versions already exist in the CI cache.
The preparation script deletes .cache/webpack at the start of every build, so the restored cache is never reused. This increases build time, uses unnecessary network bandwidth, and creates extra requests to the npm registry.
The script should preserve the existing cache and download only webpack versions that are missing or incomplete.
Steps to reproduce
1.Affter repo clone and then npm install run the preparation script below :
npm run build:prepare
- Run the same command again:
npm run build:prepare
-
Observe that second run downloads and extracts all webpack packages again instead of reusing the existing cache; (This is just for demostrating one of other issue the reuse of webpack packages cache very helpful in many terms)
-
Check the
.cache/webpackdirectory and observe that the cached Webpack sources are deleted and recreated during every run.
Expected behavior
The first build should download and extract the required webpack packages.
On later builds, the script should keep and reuse the existing files in
.cache/webpack.
Only missing or incomplete webpack versions should be downloaded again.
Environment
Node.js v24.x, npm 11.17.0 , Ubuntu 22.04.5 LTS
Have you used AI?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the implementation behind npm run build:prepare and find where .cache/webpack is deleted or rebuilt. Run the preparation command twice to observe the current behavior. Done means existing complete webpack sources remain reusable, while only missing or incomplete versions are downloaded and extracted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, webpack
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100