mirror of
https://github.com/documenso/documenso.git
synced 2026-07-27 18:35:05 +10:00
perf: upgrade to vite 8, migrate rollup to rolldown, and optimise build pipeline
- Upgrade vite from v7 to v8 (Rolldown-based bundler) - Migrate server build from rollup to rolldown, eliminating 5 plugins (rolldown handles TS, JSX, JSON, CJS, and node resolution natively) - Replace vite-plugin-babel-macros with targeted lingui macro plugin that skips files without macro imports (~90% of files) - Replace vite-tsconfig-paths with native resolve.tsconfigPaths - Remove redundant lingui error-reporter plugin (51% of plugin time) - Narrow optimizeDeps.entries from ~1060 to ~460 files - Move typecheck out of build into separate CI job (43s -> 24s build) - Fix card.tsx var() typo exposed by LightningCSS - Remove 30 unused packages (rollup, babel presets, rollup plugins, etc.) - Add vite override for peer dep compatibility - Patch @lingui/vite-plugin with moduleType for Rolldown compat
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
diff --git a/node_modules/@lingui/vite-plugin/dist/index.cjs b/node_modules/@lingui/vite-plugin/dist/index.cjs
|
||||
index cb4db5d..c0a881a 100644
|
||||
--- a/node_modules/@lingui/vite-plugin/dist/index.cjs
|
||||
+++ b/node_modules/@lingui/vite-plugin/dist/index.cjs
|
||||
@@ -114,8 +114,12 @@ You see this error because \`failOnMissing=true\` in Vite Plugin configuration.`
|
||||
}
|
||||
return {
|
||||
code,
|
||||
- map: null
|
||||
+ map: null,
|
||||
// provide source map if available
|
||||
+ // Vite 8+ (Rolldown) auto-detects module types by file extension.
|
||||
+ // Since .po files are transformed to JS, we must explicitly declare
|
||||
+ // the module type to avoid misinterpretation.
|
||||
+ moduleType: "js"
|
||||
};
|
||||
}
|
||||
}
|
||||
diff --git a/node_modules/@lingui/vite-plugin/dist/index.mjs b/node_modules/@lingui/vite-plugin/dist/index.mjs
|
||||
index 609d48d..66fa6cc 100644
|
||||
--- a/node_modules/@lingui/vite-plugin/dist/index.mjs
|
||||
+++ b/node_modules/@lingui/vite-plugin/dist/index.mjs
|
||||
@@ -106,8 +106,12 @@ You see this error because \`failOnMissing=true\` in Vite Plugin configuration.`
|
||||
}
|
||||
return {
|
||||
code,
|
||||
- map: null
|
||||
+ map: null,
|
||||
// provide source map if available
|
||||
+ // Vite 8+ (Rolldown) auto-detects module types by file extension.
|
||||
+ // Since .po files are transformed to JS, we must explicitly declare
|
||||
+ // the module type to avoid misinterpretation.
|
||||
+ moduleType: "js"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user