Skip to content

feat: add less, stylus compilers and astro, svelte, vue import resolution#1845

Merged
webpro merged 6 commits into
webpro-nl:mainfrom
trueberryless:feat/preprocessor-imports
Jul 1, 2026
Merged

feat: add less, stylus compilers and astro, svelte, vue import resolution#1845
webpro merged 6 commits into
webpro-nl:mainfrom
trueberryless:feat/preprocessor-imports

Conversation

@trueberryless

Copy link
Copy Markdown
Contributor

Description

This PR adds support for two new CSS preprocessors: Less and Stylus (very similar to Sass/Scss, but different syntax). The new compilors also have new tests and fixtures.

Additionally, this PR adds support to Astro, Svelte and Vue plugins to be able to resolve references to Scss, Less and Stylus specifiers (done with @import, @use or @require). This new logic is also tested with new fixtures.

Most changes come from the addition of fixtures, the important logic additions happen in the src/compilers/ folder.

@pkg-pr-new

pkg-pr-new Bot commented Jul 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@1845
npm i https://pkg.pr.new/@knip/language-server@1845
npm i https://pkg.pr.new/@knip/mcp@1845

commit: 47922ea

@webpro

webpro commented Jul 1, 2026

Copy link
Copy Markdown
Member

Thanks a lot! Nailed it.

@webpro
webpro merged commit 5525759 into webpro-nl:main Jul 1, 2026
30 checks passed
@trueberryless
trueberryless deleted the feat/preprocessor-imports branch July 1, 2026 11:39
@webpro

webpro commented Jul 1, 2026

Copy link
Copy Markdown
Member

This inspired me to do 3c9d4ad and bug users less about the "compiler dependencies" (they're not always installed or transitive behind some framework/lib).

@webpro

webpro commented Jul 2, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.24.0. See Release 6.24.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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.

2 participants