vite deep scan - can't import styles from node modules scoped npm pacakge
See original GitHub issueedit: 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.
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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Configuring Vite
Vite has a list of "allowed conditions" and will match the first condition that is in the allowed list. The default allowed conditions...
Read more >published vite vue 3 npm package have problem with styles
I can see style.css file in node-modules/my-package/dist/style.css But it can't be imported . How can I fix this ?
Read more >vite-plugin-inline-css-modules - npm package - Snyk
This was originally written for writing styles in SolidJS. I came from Vue, which already contained a special <style scoped> tag, and I...
Read more >equire is not defined in es module scope, you can use import ...
Environment · Operating System: Darwin · Node Version: v14.18.1 · Nuxt Version: 3.0.0-27245975.d1214c9 · Package Manager: Yarn · Bundler: Vite · User Config: ......
Read more >@wordpress/scripts - npm
You only need to install one npm module: npm install @wordpress/scripts --save-dev. Note: This package requires Node.js 14.0.0 or later, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sapphi-red you right i missed that
dist
is gitignored (exists on my machine but not pushed.) i’ve changed it tooutput
see commit https://github.com/lior-a/vite_issue/commit/2a7e1cc2e0632ba94db0ba12b58c2a71b67d9d37but it still leave us with 2 imports that don’t work and 1 that does
https://github.com/lior-a/vite_issue/blob/master/cant_import_dist_style/node_modules/%40test/package.json This file should be
node_modules/@test/ui/package.json
notnode_modules/@test/package.json
.