web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 106 forks source link

fix: globalStyles being shaked when config some sideEffects #1072

Closed Timeless0911 closed 1 month ago

Timeless0911 commented 1 month ago

Summary

In a module project, the sideEffects usually be

"sideEffects": [
  "**/*.css",
  "**/*.less",
  "**/*.sass",
  "**/*.scss"
],

when we use module doc plugin, it will build a web project, the sideEffects config will influence the tree-shaking behaviour of global styles virtual module, which caused some styles broken in the current version of rspress.

Related Issue

Checklist

netlify[bot] commented 1 month ago

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
Latest commit 8025c5fcf91eca65e5175553b41fdd79870abacd
Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/663c9c01dcab3500072e988d
Deploy Preview https://deploy-preview-1072--aquamarine-blini-95325f.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 90 (🟢 up 5 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.