[vite:css] [sass] Can't find stylesheet to import.
The SCSS file assumes it is always in /packages/enketo-core (in the monorepo) but if you obtained the SCSS using npm install enketo-core --save then that path does not exist.
Also, the reference in the SCSS file misses the css extension (it ends with .min).
To Reproduce
Create a Vite project using npm create vite@latest
Add enketo-core and sass as dependencies to package.json
Run npm install and npm run dev
Add <link rel="stylesheet" href="/node_modules/enketo-core/src/sass/plain/plain.scss" /> to your index.html
Expected behavior
No SCSS compilation error when consuming enketo-core
Thanks for filing this issue and sorry about that! If you'd like to put in a PR to fix, that would be appreciated, otherwise we'll try to get to it soon.
Describe the bug When consuming the enketo-core SCSS using Vite, I get an import issue from https://github.com/enketo/enketo/blob/15e164eabec6d49319eb720e28470ed854f6dfdc/packages/enketo-core/src/widget/date/datepicker-extended.scss#L1
The SCSS file assumes it is always in
/packages/enketo-core
(in the monorepo) but if you obtained the SCSS usingnpm install enketo-core --save
then that path does not exist. Also, the reference in the SCSS file misses the css extension (it ends with.min
).To Reproduce
npm create vite@latest
enketo-core
andsass
as dependencies topackage.json
npm install
andnpm run dev
<link rel="stylesheet" href="/node_modules/enketo-core/src/sass/plain/plain.scss" />
to yourindex.html
Expected behavior No SCSS compilation error when consuming enketo-core
Screenshots