diff --git a/src/Console/InstallsInertiaStacks.php b/src/Console/InstallsInertiaStacks.php index b8b21de25..7690b79aa 100644 --- a/src/Console/InstallsInertiaStacks.php +++ b/src/Console/InstallsInertiaStacks.php @@ -24,7 +24,7 @@ protected function installInertiaVueStack() '@inertiajs/inertia-vue3' => '^0.6.0', '@inertiajs/progress' => '^0.2.7', '@tailwindcss/forms' => '^0.5.2', - '@vitejs/plugin-vue' => '^2.3.3', + '@vitejs/plugin-vue' => '^3.0.0', 'autoprefixer' => '^10.4.2', 'postcss' => '^8.4.6', 'tailwindcss' => '^3.1.0', @@ -101,6 +101,7 @@ protected function installInertiaVueSsrStack() copy(__DIR__.'/../../stubs/inertia-vue/resources/js/ssr.js', resource_path('js/ssr.js')); $this->replaceInFile("input: 'resources/js/app.js',", "input: 'resources/js/app.js',".PHP_EOL." ssr: 'resources/js/ssr.js',", base_path('vite.config.js')); + $this->replaceInFile('});', ' ssr: {'.PHP_EOL." noExternal: ['@inertiajs/server'],".PHP_EOL.' },'.PHP_EOL.'});', base_path('vite.config.js')); (new Process([$this->phpBinary(), 'artisan', 'vendor:publish', '--provider=Inertia\ServiceProvider', '--force'], base_path())) ->setTimeout(null) @@ -131,7 +132,7 @@ protected function installInertiaReactStack() '@inertiajs/inertia-react' => '^0.8.0', '@inertiajs/progress' => '^0.2.6', '@tailwindcss/forms' => '^0.5.2', - '@vitejs/plugin-react' => '^1.3.2', + '@vitejs/plugin-react' => '^2.0.0', 'autoprefixer' => '^10.4.2', 'postcss' => '^8.4.6', 'tailwindcss' => '^3.1.0', @@ -215,6 +216,7 @@ protected function installInertiaReactSsrStack() copy(__DIR__.'/../../stubs/inertia-react/resources/js/ssr.jsx', resource_path('js/ssr.jsx')); $this->replaceInFile("input: 'resources/js/app.jsx',", "input: 'resources/js/app.jsx',".PHP_EOL." ssr: 'resources/js/ssr.jsx',", base_path('vite.config.js')); + $this->replaceInFile('});', ' ssr: {'.PHP_EOL." noExternal: ['@inertiajs/server'],".PHP_EOL.' },'.PHP_EOL.'});', base_path('vite.config.js')); (new Process([$this->phpBinary(), 'artisan', 'vendor:publish', '--provider=Inertia\ServiceProvider', '--force'], base_path())) ->setTimeout(null)