Skip to content

Commit 6c460a8

Browse files
[2.x] Vite 3 support (#1089)
* vite 3 support * do not externalise inertiajs/server * CS * Use a single Vite config file Co-authored-by: Jess Archer <[email protected]>
1 parent bea96b1 commit 6c460a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/Console/InstallCommand.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ protected function installInertiaStack()
303303
'@inertiajs/progress' => '^0.2.7',
304304
'@tailwindcss/forms' => '^0.5.2',
305305
'@tailwindcss/typography' => '^0.5.2',
306-
'@vitejs/plugin-vue' => '^2.3.3',
306+
'@vitejs/plugin-vue' => '^3.0.0',
307307
'autoprefixer' => '^10.4.7',
308308
'postcss' => '^8.4.14',
309309
'tailwindcss' => '^3.1.0',
@@ -514,6 +514,7 @@ protected function installInertiaSsrStack()
514514

515515
copy(__DIR__.'/../../stubs/inertia/resources/js/ssr.js', resource_path('js/ssr.js'));
516516
$this->replaceInFile("input: 'resources/js/app.js',", "input: 'resources/js/app.js',".PHP_EOL." ssr: 'resources/js/ssr.js',", base_path('vite.config.js'));
517+
$this->replaceInFile('});', ' ssr: {'.PHP_EOL." noExternal: ['@inertiajs/server'],".PHP_EOL.' },'.PHP_EOL.'});', base_path('vite.config.js'));
517518

518519
(new Process([$this->phpBinary(), 'artisan', 'vendor:publish', '--provider=Inertia\ServiceProvider', '--force'], base_path()))
519520
->setTimeout(null)

0 commit comments

Comments
 (0)