vite: vite deep scan - can't import styles from node modules scoped npm pacakge

edit: repo: https://github.com/lior-a/vite_issue/tree/master/cant_import_dist_style

|### Describe the bug

fail to import from node modules (during npm link of scope package) even though you can see that the file is explicitly exists in the node_modules and the path is 100% correct.

image

Reproduction

https://stackblitz.com/edit/vitejs-vite-peyhhn?file=main.js

System Info

https://stackblitz.com/edit/vitejs-vite-peyhhn?file=main.js



* note that i've created the node_modules manually and i think stackblitz just remove it or hide it somehow

Used Package Manager

npm

Logs

No response

Validations

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

@sapphi-red you right i missed that dist is gitignored (exists on my machine but not pushed.) i’ve changed it to output see commit https://github.com/lior-a/vite_issue/commit/2a7e1cc2e0632ba94db0ba12b58c2a71b67d9d37

but it still leave us with 2 imports that don’t work and 1 that does