Skip to content

Set sideEffects to CSS only + remove custom unused assets plugin#401

Draft
MattIPv4 wants to merge 2 commits intomainfrom
MattIPv4/side-effects-false
Draft

Set sideEffects to CSS only + remove custom unused assets plugin#401
MattIPv4 wants to merge 2 commits intomainfrom
MattIPv4/side-effects-false

Conversation

@MattIPv4
Copy link
Copy Markdown
Member

@MattIPv4 MattIPv4 commented Dec 9, 2025

Copilot AI review requested due to automatic review settings December 9, 2025 13:04
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Dec 9, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 UnusedAssetsPlugin class implementation (52 lines)
  • Comments out the plugin instantiation in the webpack plugins array
  • Adds sideEffects: false to 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.

@MattIPv4 MattIPv4 force-pushed the MattIPv4/side-effects-false branch from 432a291 to 4cd6325 Compare December 12, 2025 18:05
@MattIPv4 MattIPv4 changed the title Rely on sideEffects: false rather than custom unused assets plugin Set sideEffects to CSS only + remove custom unused assets plugin Dec 12, 2025
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.

2 participants