New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with npm run build with recent vite versions #4
Comments
Hey, It seems that Vite 3 has had breaking changes. I have now fixed it and published it. @mangkang can you try doing this with Sorry for the slow fix 😅 |
Hi @bluskript, Thanks for the quick response. I tried the latest code and it seems the problem still exists. This can be reproduced in the react-demo directory as well when we do npm run build. npm run build
vite v3.0.4 building for production... |
@mangkang agh! i thought dev was what was broken, didn't realize build was what was actually not working. It should work now. Try with the latest version (0.0.6)! |
@bluskript Works fine now. Thanks for the quick fix! |
Hi,
Thanks for creating this very elegant css solution. I am encountering the following error when building with vite (3.0.4) using npm run build:
[vite:load-fallback] Could not load virtual:inline-css-modules/App-0.module.css?used (imported by src/App.tsx): The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00virtual:inline-css-modules/App-0.module.css?used'
error during build:
TypeError [PLUGIN_ERROR]: Could not load virtual:inline-css-modules/App-0.module.css?used (imported by src/App.tsx): The argument 'path' must be a string or Uint8Array without null bytes. Received '\x00virtual:inline-css-modules/App-0.module.css?used'
at open (node:internal/fs/promises:450:10)
at Object.readFile (node:internal/fs/promises:795:20)
at Object.load (file:///Users/yongm1/my-react-app/node_modules/vite/dist/node/chunks/dep-71eb12cb.js:43230:35)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async file:///Users/yongm1/my-react-app/node_modules/rollup/dist/es/shared/rollup.js:22096:98
at async Queue.work (file:///Users/yongm1/my-react-app/node_modules/rollup/dist/es/shared/rollup.js:22773:32)
This contains something similar to the example (I am using it in React):
import { css } from 'vite-plugin-inline-css-modules'
const classes = css
.root { background-color: #1f1; @apply rounded-md; }
Please let me know if there is any way i could work around this.
Thanks.
The text was updated successfully, but these errors were encountered: