fix(webpack): skip building service worker in dev#38106
Conversation
Code Review Agent Run #eb8a6aActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Sequence DiagramShows the change where the webpack configuration conditionally excludes the service-worker entry in development, so the dev server does not generate/overwrite the service-worker output file. This prevents accidental commits of generated files during development. sequenceDiagram
participant Dev as Developer / Dev Server
participant Webpack as Webpack (config)
participant Build as Build Output (static/)
Dev->>Webpack: start dev-server (isDevMode = true)
Webpack->>Webpack: evaluate entries (service-worker only added if not dev)
alt Dev mode
Webpack-->>Build: build without service-worker (no service-worker.js created)
else Prod mode
Webpack-->>Build: build including service-worker (service-worker.js generated)
end
Generated by CodeAnt AI |
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
#36191 Introduced a service-worker file and the build output file in static directory. With this pr we ignore it in development mode to prevent webpack creating a build file everytime and prevents accidental committing of that generated file.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION