quanghung97 / laravel-v8js-ssr-vue
Server side rendering JavaScript with Vuejs in your Laravel application V8js
Installs: 164
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 24
Type:package
- dev-master
- v1.0
- dev-dependabot/npm_and_yarn/demo/json5-1.0.2
- dev-dependabot/npm_and_yarn/demo/express-4.18.2
- dev-dependabot/npm_and_yarn/demo/qs-and-express-6.11.0
- dev-dependabot/npm_and_yarn/demo/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/demo/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/demo/eventsource-1.1.1
- dev-dependabot/composer/demo/symfony/http-kernel-4.4.39
- dev-dependabot/npm_and_yarn/demo/url-parse-1.5.10
- dev-dependabot/npm_and_yarn/demo/follow-redirects-1.14.8
- dev-dependabot/npm_and_yarn/demo/ajv-6.12.6
- dev-dependabot/npm_and_yarn/demo/tar-4.4.19
- dev-dependabot/npm_and_yarn/demo/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/demo/dns-packet-1.3.4
- dev-dependabot/npm_and_yarn/demo/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/demo/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/demo/lodash-4.17.21
- dev-dependabot/npm_and_yarn/demo/ssri-6.0.2
- dev-dependabot/npm_and_yarn/demo/y18n-3.2.2
- dev-dependabot/npm_and_yarn/demo/elliptic-6.5.4
- dev-dependabot/npm_and_yarn/demo/axios-0.21.1
- dev-dependabot/npm_and_yarn/demo/ini-1.3.7
- dev-dependabot/npm_and_yarn/demo/websocket-extensions-0.1.4
- dev-dependabot/npm_and_yarn/demo/jquery-3.5.0
- dev-dependabot/npm_and_yarn/demo/acorn-6.4.1
This package is auto-updated.
Last update: 2024-10-30 02:21:32 UTC
README
Dependency
You must install V8js extension on PHP, If you using docker you can using php-fpm
https://github.com/quanghung97/laradock/tree/master/php-fpm
Installation
1- composer require quanghung97/laravel-v8js-ssr-vue.
2- php artisan vendor:publish --provider="Quanghung97\laravelV8jsSsrVue\LaravelSsrV8jsVueServiceProvider"
3- add config your webpack.mix.js below
mix.js('resources/js/client.js', 'public/js') .js('resources/js/server.js', 'public/js') .sass('resources/sass/app.scss', 'public/css');
This package will create component AppSSR.vue
AppSSR.js
client.js
server.js
ssr.blade.php
4- npm install vue-server-renderer --save
5- npm run dev
6- please change or remove some routes like '/' in routes/web.php
Example:
Route::get('/', function () { // change '/' to '/something' return view('welcome'); });
now you can go yourdomain and view page source have data-server-rendered="true"