-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Any plan to support customization on vite? #2
Comments
Hi @xhebox, I'm going to help you with that by adding all the So you will need to bundle from the source code provided in the package. |
I've done the change, let me know if that's enough. |
OK, now it can resolve components normally. But looks like all components does not known about the |
Mmm, I see. find this code: css: {
loaderOptions: {
scss: {
additionalData: `@import "@/wave-ui/scss/_variables.scss";@import "@/documentation/scss/_variables.scss";`
}
}
} You probably have to resolve it differently in Rollup, I don't remember though. BTW, you probably know but just to be clear, this piece of code injects the variables from wave-ui/ SCSS and from documentation/ SCSS to all the components. It's the same as adding the import of SCSS variables in each file (that would work in Rollup). |
This worked for me. Yes, I need to inject variables manually.
And now it works in vite with customization. It is enough to use it normally. Thx for your help :). I know I should open another issue... But
I guess wave-ui can do same to make vue2/vue3 share a highly similar api. Or is that api change intended? |
That's great, thanks for sharing a solution. Regarding the instantiation process, this is the only way I could get it to work, after trying multiple ways to be frank I also opened the source code from vue-router next but found it quite different use case. I will now close this issue as resolved. |
I mean https://github.com/vitejs/vite, which is backended by rollup. Of course, I can use the packed .js & .css normally.
But it is not even possible to just
import WaveUI from 'wave-ui/src/wave-ui'
on vite. It looks like vite can not resolve component without.vue
.Or maybe support customization without a deep path include(which is not encouraged by vite)? Maybe by the syntax sugar in vuejs/rfcs#182, css variables.
EDIT: BTW, nice project. I found it well-considered on many details.
The text was updated successfully, but these errors were encountered: