Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the proper url to walk through modules during dev style coll… #312

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

katywings
Copy link
Collaborator

@katywings katywings commented Jun 19, 2024

Is

We get flashes of unstyled content for any included css in dev.

Should

There should be no foucs.

Background

The happenings actually are much more complicated than the fix might suggest 🥴. We had a series of unfortunate events with the changes from the last release:

  1. The changes from Fix style collection to not collect from dynamic deps #310 applied a flawed logic to detect dynamically imported modules (as far as I can tell).
  2. A later merge conflict resolution introduced two "bugs":

Since the logic for detecting dynamically imported modules was flawed from the beginning, I removed it which fixed 2a. Secondly I fixed the line that resulted in 2b.

Follow ups

Since this undoes the changes from #310 we need to discuss a better way to identify and exclude dynamically imported modules in the style collection - (..personally I am not a fan of excluding them and the resulting foucs, but if thats really the goal, then we should atleast do it properly 😅🙈)

Videos

Before fix

2024-06-19-08.47.25.144410757-c.mp4

After fix

2024-06-19-16.17.16.662965647-c.mp4

…ection

This also undoes the changes made by 3d79eb6
because the size of `staticImportedUrls` doesn't actually tell if the url is
dynamically imported by its parent. We need a different way to detect
dynamically imported modules.
Copy link

codesandbox bot commented Jun 19, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Jun 19, 2024

🦋 Changeset detected

Latest commit: 308d489

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
vinxi Patch
@vinxi/router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jun 19, 2024

@katywings 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.

@nksaraf nksaraf merged commit 02a3270 into nksaraf:main Jun 19, 2024
4 of 6 checks passed
@XiNiHa
Copy link
Contributor

XiNiHa commented Jun 20, 2024

Why do you see the logic I wrote before was flawed? From my understanding that is a valid way to detect whether modules are statically imported (since module nodes will have node.staticImportedUrls?.size > 0 if statically imported) and the bug just originates from those two merge conflict resolutions you mentioned.

@XiNiHa
Copy link
Contributor

XiNiHa commented Jun 20, 2024

I just found that the issue was also excluding .css modules from adding. I'll make a follow-up PR for this.

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.

None yet

3 participants