Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

SSR #49

Closed
dunice-boldirev opened this issue Dec 8, 2017 · 4 comments
Closed

SSR #49

dunice-boldirev opened this issue Dec 8, 2017 · 4 comments

Comments

@dunice-boldirev
Copy link

Hello!
I trying integrate server side rendering in my project.
When I add vue2-simplert

import Simplert from 'vue2-simplert'

I get error

ReferenceError: document is not defined

Does have way for use vue2-simplert with server side rendering?

Thank you

@mazipan
Copy link
Owner

mazipan commented Dec 8, 2017

Actually, I am not familiar with SSR.
But when I look the code from vue2-simplert not found any window or document usage like your error log.

@mazipan
Copy link
Owner

mazipan commented Dec 8, 2017

Oh ya, got it.
This is because I packed JS with CSS inside one file.
Need to refactor webpack build config to extract CSS from the file.
But this thing will break another previous version.
So, will look for another workaround.
Hope can fixed soon.

@dunice-boldirev
Copy link
Author

@mazipan Thanks for the quick response. I'll wait for updates. Thank you again!

mazipan added a commit that referenced this issue Dec 11, 2017
+ simplify webpack configuration
+ add commonjs output that extract css for ssr #49
+ Fix unit test with jest
@mazipan
Copy link
Owner

mazipan commented Dec 11, 2017

Check wiki here : https://github.com/mazipan/vue2-simplert/wiki/Usage-Guidance#ssr-import-simplert-from-node_modules-for-ssr
Let me know and open another issue if something wrong

@mazipan mazipan closed this as completed Dec 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants