Skip to content
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

[2.x] Add Inertia SSR Support #1012

Merged
merged 7 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: fixes
  • Loading branch information
xiCO2k committed Mar 20, 2022
commit 2f253116b3e8b06c4bb56c646e40068052a5240e
2 changes: 1 addition & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ protected function installInertiaSsrStack()
});

$this->replaceInFile("'enabled' => false", "'enabled' => true", config_path('inertia.php'));
$this->replaceInFile("mix --production", "mix --production --mix-config=webpack.ssr.mix.js && mix --production", base_path('package.json'));
$this->replaceInFile('mix --production', 'mix --production --mix-config=webpack.ssr.mix.js && mix --production', base_path('package.json'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion stubs/inertia/resources/js/ssr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSSRApp, h } from 'vue';
import { renderToString } from '@vue/server-renderer';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import createServer from '@inertiajs/server'
import createServer from '@inertiajs/server';
import route from 'ziggy';

const appName = 'Laravel';
Expand Down