Skip to content

Commit 923edb7

Browse files
authored
use framework build target in Vite builds (#6643)
1 parent 0e9ccc1 commit 923edb7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- Fixed issue where Auth emulator sign in with Google only shows default tenant. (#6683)
22
- Prevent the use of pinTags + minInstances on the same function, as the features are not mutually compatible (#6684)
33
- Add force flag to delete backend (#6635).
4+
- Use framework build target in Vite builds (#6643).

src/frameworks/sveltekit/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export const discover = viteDiscoverWithNpmDependency("@sveltejs/kit");
1414

1515
export { getDevModeHandle, supportedRange } from "../vite";
1616

17-
export async function build(root: string) {
17+
export async function build(root: string, target: string) {
1818
const config = await getConfig(root);
1919
const wantsBackend = config.kit.adapter?.name !== "@sveltejs/adapter-static";
20-
await viteBuild(root);
20+
await viteBuild(root, target);
2121
return { wantsBackend };
2222
}
2323

src/frameworks/vite/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ export async function discover(dir: string, plugin?: string, npmDependency?: str
7878
};
7979
}
8080

81-
export async function build(root: string) {
81+
export async function build(root: string, target: string) {
8282
const { build } = relativeRequire(root, "vite");
8383

8484
await warnIfCustomBuildScript(root, name, DEFAULT_BUILD_SCRIPT);
8585

8686
// SvelteKit uses process.cwd() unfortunately, chdir
8787
const cwd = process.cwd();
8888
process.chdir(root);
89-
await build({ root, mode: "production" });
89+
await build({ root, mode: target });
9090
process.chdir(cwd);
9191

9292
return { rewrites: [{ source: "**", destination: "/index.html" }] };

0 commit comments

Comments
 (0)