-
Notifications
You must be signed in to change notification settings - Fork 7
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
window undefined #21
Comments
A workaround for SSR (nuxt) is to load vue-nl2br with
Works for me! |
thanks @HugoHeneault but it doesn't work :
i get an error :
|
Where does this error come from? Browser or server? Which nuxt version do you use? |
Server during the compilation, i use the last version 2.8.1.. |
Weird. It's working for me :/ |
strange...yeah see :
|
You need to add |
Why i need to transpile |
Most of the time you're loading transpiled libs. But this one doesn't work with your env. So you're loading the sources, but nuxt isn't able to load es6 sources, so you need to transpile them to something it can run. :) |
hmmm, so, for example, i use |
Two years later, but I still came across this issue. As 'window' is only defined on the client side in Nuxt, you may consider putting the nl2br component into a plugin that is only loaded on the client side:
Nl2Br can then be used as |
I recently upgraded my version of vue-nl2br and i get an error : window undefined.
Please fix this please.
(i need to use this component for SSR)
Thanks
The text was updated successfully, but these errors were encountered: