From f2f3e452880c18327e69319c4b0e46742443c2bb Mon Sep 17 00:00:00 2001 From: "R.M. Reza" Date: Mon, 11 Jul 2022 18:37:25 +0700 Subject: [PATCH] Fix: React SSR installation error (#169) * Fix: React SSR installation error * Update InstallsInertiaStacks.php Co-authored-by: Taylor Otwell --- src/Console/InstallsInertiaStacks.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Console/InstallsInertiaStacks.php b/src/Console/InstallsInertiaStacks.php index 2846440d3..34a27536d 100644 --- a/src/Console/InstallsInertiaStacks.php +++ b/src/Console/InstallsInertiaStacks.php @@ -185,7 +185,10 @@ protected function installInertiaReactStack() copy(__DIR__.'/../../stubs/inertia-common/jsconfig.json', base_path('jsconfig.json')); copy(__DIR__.'/../../stubs/inertia-react/vite.config.js', base_path('vite.config.js')); copy(__DIR__.'/../../stubs/inertia-react/resources/js/app.jsx', resource_path('js/app.jsx')); - unlink(resource_path('js/app.js')); + + if (file_exists(resource_path('js/app.js'))) { + unlink(resource_path('js/app.js')); + } $this->replaceInFile('.vue', '.jsx', base_path('tailwind.config.js'));