fix(discord) : resolve server-only worker bundle
This commit is contained in:
@@ -16,6 +16,7 @@ RUN bun build scripts/outbox-worker.ts \
|
||||
--outfile=dist/outbox-worker.js && \
|
||||
bun build backend/discord.ts \
|
||||
--target=bun \
|
||||
--conditions=react-server \
|
||||
--minify \
|
||||
--outfile=dist/discord.js && \
|
||||
bun build scripts/migrate.ts --target=bun --minify --outfile=dist/migrate.js
|
||||
|
||||
@@ -103,6 +103,9 @@ describe("production deployment contract", () => {
|
||||
"ENV NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID=${NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID}",
|
||||
);
|
||||
expect(dockerfile).toContain("backend/discord.ts");
|
||||
expect(dockerfile).toMatch(
|
||||
/bun build backend\/discord\.ts[\s\S]*?--conditions=react-server[\s\S]*?--outfile=dist\/discord\.js/u,
|
||||
);
|
||||
expect(dockerfile).toContain("./worker/discord.js");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user