Skip to content

fix(demo): declare the sass dependency vite's scss compilation needs - #5206

Merged
JoviDeCroock merged 1 commit into
preactjs:mainfrom
upupming:fix/demo-declare-sass
Aug 20, 2026
Merged

fix(demo): declare the sass dependency vite's scss compilation needs#5206
JoviDeCroock merged 1 commit into
preactjs:mainfrom
upupming:fix/demo-declare-sass

Conversation

@upupming

Copy link
Copy Markdown
Contributor

demo/index.jsx imports style.scss, but sass was never declared in demo/package.json — only an orphaned node_modules/sass@1.53.0 entry in demo/package-lock.json kept it working:

  • npm ci installs the lockfile verbatim (orphaned entries included), so the demo happens to run;
  • a fresh npm install prunes the unreachable entry and rewrites the lockfile, after which npm run dev fails with:
[vite] Internal server error: Preprocessor dependency "sass-embedded" not found. Did you install it?
  Plugin: vite:css
  File: demo/style.scss

This reproduces on current main as well as the 10.x line (the orphaned entry dates back to the vite migration of the demo).

The fix declares sass@^1.53.0 — matching the version already present in the lockfile — so the lockfile change is a single line turning the orphaned entry into a reachable one. Verified that both npm ci and a fresh npm install now produce a demo where vite compiles style.scss successfully.

demo/index.jsx imports style.scss, but sass was never declared in
demo/package.json — only an orphaned node_modules/sass@1.53.0 entry in
the lockfile kept it working: npm ci installs the lockfile verbatim
(orphans included), while a fresh npm install prunes the unreachable
entry and rewrites the lockfile, after which vite fails with
'Preprocessor dependency "sass-embedded" not found'.

Declare sass@^1.53.0 (matching the existing lockfile entry) so both
install paths produce a working demo.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 98.61%. remained the same — upupming:fix/demo-declare-sass into preactjs:main

@JoviDeCroock
JoviDeCroock merged commit 91e5bfc into preactjs:main Aug 20, 2026
5 checks passed
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 25, 2026
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.

3 participants