-
Notifications
You must be signed in to change notification settings - Fork 11
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
createServer is not a function #10
Comments
Same here, when I run a Laravel Vite build |
FYI: In the Laravel Jetstream, we solve this by not externalising the server. import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
// ...
}),
// ...
],
ssr: {
noExternal: ['@inertiajs/server'],
},
}); |
Where to put this option? |
In the Vite configuration. |
in my case, i used ssr.jsx in input of laravel function call (-_-')\
You can check some configuration in Jetstream, like i did after read @timacdonald comment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe there's a bug related to Node ESM in some scenarios when trying to lift the SSR server that causes the
createServer
function to be undefined.How to reproduce:
Run
vite build && vite build --ssr
Run
node bootstrap/ssr/ssr.mjs
Node version: 18.4.0
Package version: 0.1.0
How to workaround
The text was updated successfully, but these errors were encountered: