Client assets overwritten by SSR build when no serverEntryPoints are configured
@thetutlage is already working on this.
Since Sep 7, 2026.
- Dominant language
- TypeScript
- Stars
- 49
- Forks
- 8
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 2
Description
Package version
6.0.1
Describe the bug
After upgrading to @adonisjs/vite 6 and Vite 8, node ace build runs both a client build and an SSR build, even though our application has Inertia SSR disabled and no serverEntryPoints configured.
Both builds use public/assets as their output directory. The SSR build runs second and overwrites the client assets and manifest. The command completes successfully, but the resulting frontend entry contains server-rendering code and unresolved package imports.
Versions
@adonisjs/core: 7.5.0@adonisjs/vite: 6.0.1vite: 8.2.2@vitejs/plugin-vue: 6.0.8@adonisjs/inertia: 5.0.1@inertiajs/vue3: 3.7.0
Relevant configuration
config/inertia.ts:
export default defineConfig({
rootView: 'inertia_layout',
ssr: {
enabled: false,
},
})
Relevant plugins in vite.config.ts:
plugins: [
vue(),
adonisjs({
entryPoints: ['inertia/main.ts'],
reload: ['resources/views/**/*.edge'],
}),
]
No serverEntryPoints, custom SSR environment, or custom output directory is configured.
Steps to reproduce
- Run
node ace buildwith the configuration above. - Observe that Vite builds the client environment, then the SSR environment.
- Inspect
build/public/assets/.vite/manifest.json. - Open the file referenced by the
inertia/main.tsentry.
Actual result
The final manifest points to main.js. It also imports SSR helpers, including ssrRenderComponent, from "vue/server-renderer".
Expected result
With no server entry points configured, the production build should preserve the client bundle and its manifest, without an additional SSR build overwriting them.
Investigation and workaround
The Vue plugin contributes top-level SSR options. Vite creates an SSR environment, and the Adonis build hook calls createBuilder({}, false).buildApp(), which builds both environments.
Explicitly building only the client environment prevents the issue:
builder: {
async buildApp(builder) {
await builder.build(builder.environments.client)
},
},
Reproduction repo
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.