Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions vite-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,15 @@ export default function jahia(
*/
config(config) {
// Mutate the configuration to set base settings if they are not already set
// Build all environments https://vite.dev/guide/api-environment-frameworks.html#environments-during-build
config.builder ??= { sharedConfigBuild: true };

// Enable the modern JSX runtime
config.esbuild ??= { jsx: "automatic" };

return {
// Build all environments https://vite.dev/guide/api-environment-frameworks.html#environments-during-build
builder: { sharedConfigBuild: true },
// Enforce bundling of all dependencies
ssr: { noExternal: true },
// Define the environments (client and ssr)
environments: {
client: {
build: {
Expand Down