Closed XiNiHa closed 2 months ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
Latest commit: 1d85e5d850aac412f4520ceb6eb19bc73324126d
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@XiNiHa is attempting to deploy a commit to the Nikhil Saraf's projects Team on Vercel.
A member of the Team first needs to authorize it.
@XiNiHa Very nice 🥳, thank you for your work! One question from my side: did you check how much this regex overall degrades the performance of the css collection and if it somehow can be skipped on repeated redundant collections (especially in prod)
Not really :sweat_smile: I haven't had any concerns around performance since RegExp is mostly fast in JS and I didn't use any performance-critical features like lookahead. Also since it's only a build-time work so just adding a RegExp check wouldn't be that critical to performance (tbh replacing Babel with SWC would make much more impact here)
I mean if we decided to do this I don't see a way of avoiding the reading through the code like this. So we are going to give it a shot. If it slows things down considerably we would need to adjust it minorly or I suppose come up with a different solution. But I think we are sort of priced into something like this with the agreed on solution.
Continued from #316, cc @katywings
This PR adds
// @vinxi-ignore-style-collection
directive to ignore a module from the style collection. The directive only works when added at the top of the file, before having any meaningful code beside comments and whitespaces.