Skip to content
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

Build issue with unocss vite 2.9.1 #1332

Closed
itpropro opened this issue Jul 24, 2022 · 1 comment
Closed

Build issue with unocss vite 2.9.1 #1332

itpropro opened this issue Jul 24, 2022 · 1 comment

Comments

@itpropro
Copy link
Contributor

When building a small component library with "vite": "^2.9.1" and "@vitejs/plugin-vue": "^2.3.2",, vite build always produces the following error:

...
vite v2.9.14 building for production...
transforming (6) ...
✓ 9 modules transformed.
dist/components.es.js   5.75 KiB / gzip: 1.93 KiB
dist/style.css               10.08 KiB / gzip: 2.65 KiB
rendering chunks (1)...[unocss:global:build:generate] [unocss] does not found CSS placeholder in the generated chunks,
this is likely an internal bug of unocss vite plugin
error during build:
Error: [unocss] does not found CSS placeholder in the generated chunks,
this is likely an internal bug of unocss vite plugin
...

There is just one basic .vue component for testing that is exported with

import '@unocss/reset/tailwind.css';
import 'uno.css';
export { default as Test } from "./Test.vue";

When changing to the latest (v3) version of vite, everything works fine. Unfortunately I am using histoire, which is not Vite 3 compatible yet.
The resulting style.css are the same with and without the error, but the build stops before generating the umd version.

@itpropro
Copy link
Contributor Author

itpropro commented Jul 25, 2022

I will just use Vite 3 with histoire-nuxt :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant