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?]: Latest Vinxi (>= 0.3.11) causes layout shifts in dev #1429

Closed
2 tasks done
ersinakinci opened this issue Mar 29, 2024 · 4 comments
Closed
2 tasks done

[Bug?]: Latest Vinxi (>= 0.3.11) causes layout shifts in dev #1429

ersinakinci opened this issue Mar 29, 2024 · 4 comments
Labels
bug Something isn't working vinxi related to vinxi

Comments

@ersinakinci
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

If you create a new project using npm init solid@latest, there's a lot of jank on the screen when loading any page on dev (npm run dev). Running perf tools suggests that CSS isn't getting loaded right away.

I found through experimentation that downgrading to vinxi@0.3.10 or earlier fixes the issue. As of writing, npm init solid@latest installs vinxi@0.3.11.

Prod builds (npm run build && npm run start) are unaffected regardless of version.

Expected behavior 馃

There shouldn't be massive layout shifts on the screen in dev while running the latest Vinxi.

Steps to reproduce 馃暪

Steps:

  1. npm init solid@latest
  2. npm run dev
  3. Visit the home page.

Context 馃敠

No response

Your environment 馃寧

2021 M1 MacBook Pro, macOS Sonoma 14.4.1
Chrome 123.0.6312.87
node v21.7.1

`package.json`


{
  "name": "example-with-tailwindcss",
  "type": "module",
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start"
  },
  "dependencies": {
    "@solidjs/router": "^0.13.1",
    "@solidjs/start": "^1.0.0-rc.0",
    "autoprefixer": "^10.4.14",
    "postcss": "^8.4.26",
    "solid-js": "^1.8.16",
    "tailwindcss": "^3.3.3",
    "vinxi": "^0.3.10"
  },
  "engines": {
    "node": ">=18"
  }
}```
@ersinakinci ersinakinci added the bug Something isn't working label Mar 29, 2024
@nksaraf
Copy link
Member

nksaraf commented Mar 29, 2024

can you give example of what css files are not being loaded. In v0.3.11 we added a feature where we didn't scrape node_modules for css files. Maybe this is what changed

@ersinakinci
Copy link
Author

app.css from the project directory, I guess. The screen flashes very clearly when you spin up a new instance using the solid cli tool.

@ersinakinci
Copy link
Author

The CSS gets loaded, it's just not loaded right away, hence the jank.

@katywings
Copy link
Contributor

Related PR: #1423

@ryansolid ryansolid added the vinxi related to vinxi label Mar 31, 2024
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

4 participants