Closed thepassle closed 2 months ago
lightningcss
is an optional peer dependency of Vite. Perhaps the resolver could check Vite's package.json
peer deps?
Hm, I dont think thats the responsibility of the module resolution algorithm, afaik most resolution libraries dont look at peerdependencies
I think i'll just recommend people disable linting the config file for this plugin for now, the plugin is more concerned with source code rather than config files anyway
Describe the bug
I wrote an eslint plugin that does some module graph analysis to avoid people from importing from barrel files. In order to do this, we crawl the module graph for the files in the users project. A user of my plugin submitted an issue to the eslint plugin because it seems to fail on the
vite
import invite.config.ts
. I can see that in the bundle of Vite (indep-C1-ZB6nQ.js
), the following dynamic import is present:However, when I look in my
node_modules
, it seems likelightningcss
is not installed:Because
lightningcss
, the resolution library that I'm using (oxc-resolver
) is unable to resolvelightningcss
, because it's not installed.Is this import for lightningcss left as a bare module specifier intentionally? Or could this be an oversight?
Reproduction
https://github.com/starkfire/barrel-vite
Steps to reproduce
npm i npm run lint
System Info
Used Package Manager
npm
Logs
No response
Validations