Set sideEffects to CSS only + remove custom unused assets plugin#401
Set sideEffects to CSS only + remove custom unused assets plugin#401
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
extension-preview | 4cd6325 | Commit Preview URL Branch Preview URL |
Dec 12 2025, 06:06 PM |
There was a problem hiding this comment.
Pull request overview
This PR attempts to replace a custom UnusedAssetsPlugin webpack plugin with the sideEffects: false package.json configuration. However, this approach has a fundamental misunderstanding of what these two mechanisms do. The custom plugin removed unused asset files (images, fonts, etc.) from the build output, while sideEffects: false is a flag for JavaScript tree-shaking that tells bundlers which modules can be safely removed if their exports aren't used. These serve completely different purposes and are not interchangeable.
Key changes:
- Comments out the entire
UnusedAssetsPluginclass implementation (52 lines) - Comments out the plugin instantiation in the webpack plugins array
- Adds
sideEffects: falseto package.json
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| webpack.config.ts | Comments out the custom UnusedAssetsPlugin class and its usage in the plugins array |
| package.json | Adds sideEffects: false configuration, which is incompatible with the codebase's CSS imports and initialization code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
432a291 to
4cd6325
Compare
cc alveusgg/data#221