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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: import order of styles is reversed in dev mode #1478

Open
2 tasks done
elite174 opened this issue May 15, 2024 · 3 comments
Open
2 tasks done

[Bug?]: import order of styles is reversed in dev mode #1478

elite174 opened this issue May 15, 2024 · 3 comments
Labels
bug Something isn't working vinxi related to vinxi

Comments

@elite174
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

Having this:

import { BannerCarousel } from "@components/BannerCarousel/BannerCarousel";
import { Footer } from "@components/Footer/Footer";
import { Pagination } from "@components/Pagination/Pagination";
import videoGridStyles from "@components/VideoGrid/VideoGrid.module.scss";
import { VideoPreview } from "@components/VideoPreview/VideoPreview";

import styles from "./HomePage.module.scss";

HomePage styles in dev mode is on the top (incorrect), but after build it's on the bottom (correct)

Expected behavior 馃

Order of styles should be preserved. HomePage styles should be the last one.

Steps to reproduce 馃暪

Steps:

Context 馃敠

No response

Your environment 馃寧

solid-start rc 1
@elite174 elite174 added the bug Something isn't working label May 15, 2024
@ryansolid ryansolid added the vinxi related to vinxi label May 15, 2024
@elite174
Copy link
Author

elite174 commented May 16, 2024

Looks like the problem somewhere here: https://github.com/nksaraf/vinxi/blob/6f3d81beabc8cf003c0095eb9b44198ed02f2784/packages/vinxi-solid/lazy-route.jsx

or in function appendStyles

@elite174
Copy link
Author

I do want to fix this, because it makes development really difficult and buggy, especially when you do solid-start for work. @nksaraf how can I help with that? It's difficult to understand in the code what's going on.
Importing styles should be DFS, but now it looks more like a BFS.

@elite174
Copy link
Author

Investigating: the order of styles is described here: https://github.com/nksaraf/vinxi/blob/6f3d81beabc8cf003c0095eb9b44198ed02f2784/packages/vinxi/lib/manifest/collect-styles.js#L4

Maybe the problem should be fixed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vinxi related to vinxi
Projects
None yet
Development

No branches or pull requests

2 participants