Files
cms/.stylelintrc.json
8be5895ae9 fix(ui): invalid sass imports to support windows - add Stylelint to prevent regression (#15028)
Fixes invalid Sass import paths in the compiled @payloadcms/ui output
that currently rely on legacy webpack resolution behavior.

Fixes issue #15011 

```
./nodemodules/.pnpm/@[email protected].0@type_f6dae4b1d169b9370a166162f9bf6e5f/node_modules/@payloadcms/ui/dist/widgets/CollectionCards/index.scss

Error evaluating Node.js code
Error: Can't find stylesheet to import.
  ╷
1 │ @import 'vars';
  │         ^^^^^^
```

Patch file
```
diff --git a/dist/widgets/CollectionCards/index.scss b/dist/widgets/CollectionCards/index.scss
index 0330e9c283160e35ad22f7f244bba840bc57c66f..c8776a72ede7877fc2fba855a89b96603f7eb5b9 100644
--- a/dist/widgets/CollectionCards/index.scss
+++ b/dist/widgets/CollectionCards/index.scss
@@ -1,4 +1,4 @@
-@import '~@payloadcms/ui/scss';
+@import '../../scss/styles';
 
 @layer payload-default {
   .collections {
```

Running a patch file to adjust this import fixes the issue.

---------

Co-authored-by: German Jablonski <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-01-05 18:23:32 +00:00

8 lines
142 B
JSON

{
"customSyntax": "postcss-scss",
"plugins": ["./.stylelint/no-tilde-imports.js"],
"rules": {
"plugin/no-tilde-imports": true
}
}