Replies: 4 comments 6 replies
-
|
Even I am facing this issue ? Did you find a way to resolve css in exports? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Fixed by completely removing |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I just encountered the same problem, and its solution is as follows: In "exports": {
".": {
"import": "./dist/xxx.es.js",
"require": "./dist/xxx.umd.js"
},
"./dist/index.css": {
"import": "./dist/index.css",
"require": "./dist/index.css"
}
}It works for me. |
Beta Was this translation helpful? Give feedback.
4 replies
-
"exports": {
".": {
"import": "./dist/xxx.es.js",
"require": "./dist/xxx.umd.js"
},
"./dist/": {
"import": "./dist/",
"require": "./dist/"
}
}Or "exports": {
".": {
"import": "./dist/xxx.es.js",
"require": "./dist/xxx.umd.js"
},
"./dist/*.css": {
"import": "./dist/*.css",
"require": "./dist/*.css"
}
}will resolve this |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We have a project and a internal library. The project runs with react-scripts and I try to make it use vite.
When I run
vite, I have an error :Missing "./dist/index.css" export in "XXX" packagewhere XXX is our home made libraryHere is the export part in the library :
I guess I should add "./dist/index.css" somewhere in package.json exports {} but I can't find how. If I remove the exports, I don't have the error but I begin to see other issues with commonjs import (?)
How can I make this library compatible with vite / es import ?
Beta Was this translation helpful? Give feedback.
All reactions