exodusanto / laravel-ssr

Vue Server Side Rendering with Laravel + Node
20 stars 3 forks source link

can you upgrade this to use laravel 5.5 and latest vue , vuex , vue router ? #1

Open codeitlikemiley opened 6 years ago

codeitlikemiley commented 6 years ago

I tried upgrading this to laravel 5.5 and latest vue , vue-router and vuex but , sadly i kept getting an error

content.js:218 Uncaught TypeError: Cannot read property 'childNodes' of null
    at HTMLDocument.ready (content.js:218)
ready @ content.js:218
global-shortcut.js:10 Uncaught TypeError: Cannot read property 'hasAttribute' of null
    at global-shortcut.js:10
    at global-shortcut.js:10
codeitlikemiley commented 6 years ago

the issue is on laravel-mix , when i try to upgrade laravel-mix to latest its keeps poping this error, but if i use the old one version 0.* , its working normal... hope you can update the code to work with latest laravel mix version

codeitlikemiley commented 6 years ago

exodusanto , i manage to make it work with laravel 5 , and updated all vue , vuex, vue router, and even include vuetify in it, but i havent updated laravel mix... hope you can update it for latest laravel mix thanks

codeitlikemiley commented 6 years ago

I really like how you implement this stuff , that we can use server bundler to use code splitting , which load only a chunk of the script we needed... which in my older implementation with phpv8 js cant be done. thank you so much

exodusanto commented 6 years ago

@codeitlikemiley vue update some stuff in past months so i need time to figure out the changes. I suggest you to read the doc of ssr https://ssr.vuejs.org/en/

codeitlikemiley commented 6 years ago

i have an update version working in laravel 5.5 but it has side effects, it causes me to render two content of the same component , which is not the desired behaviour image

codeitlikemiley commented 6 years ago

This only happens when i run node server for ssr, but for the normal app without ssr its working... so my guest is its either the bundler or the server or the router... will post update about this issue

codeitlikemiley commented 6 years ago

image image image image

I manage to fix it , i havent added css on any components yet... This is the big obstacle for me now , coz i cant properly add it the same as in the ssr page of vue... but i know i need messed up webpack.mix.js and webpack-server.js i can manage to make it work on webpack.mix.js but on webpack-server.js if i do confiure it, i keep experiencing a loop of revisiting the same link over and over...