added format command and added trailing commas to reduce conflicts

This commit is contained in:
dswbx
2025-02-26 20:06:03 +01:00
parent 88b5359f1c
commit 7743f71a11
414 changed files with 3622 additions and 3610 deletions

View File

@@ -8,7 +8,7 @@ export const devServerConfig = {
/^\/@.+$/,
/\/components.*?\.json.*/, // @todo: improve
/^\/(public|assets|static)\/.+/,
/^\/node_modules\/.*/
/^\/node_modules\/.*/,
] as any,
injectClientScript: false
injectClientScript: false,
} as const;

View File

@@ -24,7 +24,7 @@ window.__vite_plugin_react_preamble_installed__ = true
</script>
<script type="module" src="/@vite/client"></script>
${addBkndContext ? "<!-- BKND_CONTEXT -->" : ""}
</head>`
</head>`,
);
}
@@ -39,12 +39,12 @@ async function createApp(config: ViteBkndConfig = {}, env?: any) {
: {
html: config.html,
forceDev: config.forceDev ?? {
mainPath: "/src/main.tsx"
}
mainPath: "/src/main.tsx",
},
},
serveStatic: ["/assets/*", serveStatic({ root: config.distPath ?? "./" })]
serveStatic: ["/assets/*", serveStatic({ root: config.distPath ?? "./" })],
},
env
env,
);
}
@@ -53,7 +53,7 @@ export function serveFresh(config: Omit<ViteBkndConfig, "mode"> = {}) {
async fetch(request: Request, env: any, ctx: ExecutionContext) {
const app = await createApp(config, env);
return app.fetch(request, env, ctx);
}
},
};
}
@@ -66,7 +66,7 @@ export function serveCached(config: Omit<ViteBkndConfig, "mode"> = {}) {
}
return app.fetch(request, env, ctx);
}
},
};
}
@@ -77,6 +77,6 @@ export function serve({ mode, ...config }: ViteBkndConfig = {}) {
export function devServer(options: DevServerOptions) {
return honoViteDevServer({
...devServerConfig,
...options
...options,
});
}