-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
"document is not defined" when using bootstrap js #148
Comments
Okay this is weird. I console logged |
Your issue is not related to the plugin. |
But to answer your question: |
@brillout But it doesn't happen without SSR. I tried it on regular vite project and everything works fine. Even doing |
It's an SSR problem, but not a vite-plugin-ssr problem. Dig on bootstrap's side. |
Okay thanks |
For anyone that stumbles upon this issue: |
Thanks for sharing. What solution did you end up choosing? |
This one: twbs/bootstrap#33722 |
From Discord:
Reply:
|
Yeah but that will include the whole bootstrap js file. I only needed some components. So did the lazy loading js way. |
Makes sense. |
So I have this component which uses
collapse.js
ofbootstrap
,I get this error:
ReferenceError: document is not defined
. On nuxt, you could do,How do I do the same?
The text was updated successfully, but these errors were encountered: