-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
SSR Support! #55
Comments
Yes. You can use Nuxt: npx create-nuxt-app <my-project>
And edit import { resolve } from "path";
export default {
// ...
alias: {
vue$: resolve(__dirname, './node_modules/vue/dist/vue.esm.js')
}
}; Then, enjoy :) |
@elf-mouse https://github.com/vitejs/vite/tree/main/packages/playground/ssr-vue Can you help me with this, please? |
@elf-mouse @ [vite] Error when evaluating SSR module /node_modules/balm-ui/dist/balm-ui-plus.esm.js: Also, trying to do Individual Usage Otherise, doing |
Hi @folamy , SSR support is still experimental for vite, so I haven't fully verified I'm try to using https://github.com/vitejs/vite/tree/main/packages/playground/ssr-vue, and the vite example can not work correctly @vitejs:
|
You need to manually install vite. |
@elf-mouse |
Do I have to open another issue for this? |
(node v16.2.0) My steps:
Please give me your demo repository, I would to debug or fix it. |
Hi @folamy , I will to write a demo/scaffold for vue3 ssr with BalmUI when I have time later. Thank you so much~ |
@elf-mouse
|
@elf-mouse, as you have requested, I commented with a demo repo above! |
Hi @folamy , NOW, The Thank you so~ much!!! |
Thank you @elf-mouse, I can see the changes already. Now, how do I change the color theme? Remember, I am not using balm Cli, but vite! |
Please see BalmUI theme apis document. simple example: <template>
<ui-button @click="$alert('hi')">SayHi</ui-button>
<ui-button @click="onChangeTheme">Change Theme</ui-button>
</template> export default {
methods: {
onChangeTheme() {
this.$theme.primary = "red";
this.$theme.onPrimary = "white";
}
}
}; |
Hi @folamy , You need update your module.exports = {
// ...
resolve: {
alias: {
vue: "vue/dist/vue.esm-bundler.js",
"balm-ui-plus": "balm-ui/dist/balm-ui-plus.esm.js",
"balm-ui-css": "balm-ui/dist/balm-ui.css"
}
}
}; |
@elf-mouse `import $theme from '...' })` Can this work? |
We use dart sass overwrite for defaults. And I have updated the |
Hi @elf-mouse. [Vue warn]: resolveDirective can only be used in render() or setup(). ReferenceError: document is not defined |
Oh! It's a lifecycle bug. I have fixed this problem in But I still don’t have time to fully test SSR. @folamy , thanks for your patience! |
Hey!
|
Hi @folamy , You need to install <style lang="scss">
@use '@material/theme/variables' as theme-variables with (
$primary: #f00
);
@use 'balm-ui/components/icon' with (
$font-path: 'balm-ui/fonts'
);
@use 'balm-ui/dist/balm-ui';
// your code
</style> |
Can I use balm-ui in vue ssr?
The text was updated successfully, but these errors were encountered: