Skip to content

Commit edbaed7

Browse files
authored
feat(fullstack): add clientBuildFallback option (#1289)
This is nice for dynamic client entry, but this can be disabled for Nitro for now to avoid a slightly annoying log when the app is server only nitrojs/nitro#3662 ``` ◐ Building [Client] nitro 12:51:18 AM vite v7.1.10 building for production... ✓ 1 modules transformed. Generated an empty chunk: "__fallback". ✓ built in 23ms ```
1 parent 989fcc9 commit edbaed7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/plugin.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ type FullstackPluginOptions = {
5555
* @default true
5656
*/
5757
devEagerTransform?: boolean;
58+
/**
59+
* @default true
60+
*/
61+
clientBuildFallback?: boolean;
5862
};
5963
};
6064

@@ -543,7 +547,9 @@ export default __assets_runtime.mergeAssets(${codes.join(", ")});
543547
order: "post",
544548
handler(name, config, _env) {
545549
if (name === "client") {
546-
if (!config.build?.rollupOptions?.input) {
550+
const clientBuildFallback =
551+
pluginOpts?.experimental?.clientBuildFallback ?? true;
552+
if (clientBuildFallback && !config.build?.rollupOptions?.input) {
547553
return {
548554
build: {
549555
rollupOptions: {

0 commit comments

Comments
 (0)