forked from inertiajs/pingcrm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47d3cae
commit b1eb5b0
Showing
10 changed files
with
2,323 additions
and
2,199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Server Side Rendering | ||
|-------------------------------------------------------------------------- | ||
| | ||
| These options configures if and how Inertia uses Server Side Rendering | ||
| to pre-render the initial visits made to your application's pages. | ||
| | ||
| Do note that enabling these options will NOT automatically make SSR work, | ||
| as a separate rendering service needs to be available. To learn more, | ||
| please visit https://inertiajs.com/server-side-rendering | ||
| | ||
*/ | ||
|
||
'ssr' => [ | ||
|
||
'enabled' => true, | ||
|
||
'url' => 'http://127.0.0.1:13714/render', | ||
|
||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Testing | ||
|-------------------------------------------------------------------------- | ||
| | ||
| The values described here are used to locate Inertia components on the | ||
| filesystem. For instance, when using `assertInertia`, the assertion | ||
| attempts to locate the component as a file relative to any of the | ||
| paths AND with any of the extensions specified here. | ||
| | ||
*/ | ||
|
||
'testing' => [ | ||
|
||
'ensure_pages_exist' => true, | ||
|
||
'page_paths' => [ | ||
|
||
resource_path('js/Pages'), | ||
|
||
], | ||
|
||
'page_extensions' => [ | ||
|
||
'js', | ||
'jsx', | ||
'svelte', | ||
'ts', | ||
'tsx', | ||
'vue', | ||
|
||
], | ||
|
||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { createSSRApp, h } from 'vue' | ||
import { renderToString } from '@vue/server-renderer' | ||
import { createInertiaApp } from '@inertiajs/inertia-vue3' | ||
import createServer from '@inertiajs/server' | ||
|
||
createServer((page) => createInertiaApp({ | ||
page, | ||
render: renderToString, | ||
resolve: name => require(`./Pages/${name}`), | ||
title: title => title ? `${title} - Ping CRM` : 'Ping CRM', | ||
setup({ app, props, plugin }) { | ||
return createSSRApp({ | ||
render: () => h(app, props), | ||
}).use(plugin) | ||
}, | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const mix = require('laravel-mix') | ||
const webpackNodeExternals = require('webpack-node-externals') | ||
const webpackConfig = require('./webpack.config') | ||
|
||
mix | ||
.options({ manifest: false }) | ||
.js('resources/js/ssr.js', 'public/js') | ||
.vue({ version: 3, options: { optimizeSSR: true } }) | ||
.webpackConfig({ | ||
...webpackConfig, | ||
target: 'node', | ||
externals: [webpackNodeExternals()], | ||
}) |
Oops, something went wrong.