Skip to content

Commit 063ab4d

Browse files
authored
fix(backend): bundle cookie package to fix cjs/esm issues (#7524)
Why: CJS cookie package causing module compatibility problems in Astro and TanStack Start What: Move cookie to devDependencies and bundle with tsup noExternal config
1 parent e76d248 commit 063ab4d

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.changeset/rotten-months-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@clerk/backend": patch
3+
---
4+
5+
Move cookie to devDependencies and bundle it within @clerk/backend to fix module compatibility problems in TanStack Start apps.

packages/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@
110110
},
111111
"dependencies": {
112112
"@clerk/shared": "workspace:^",
113-
"cookie": "1.0.2",
114113
"standardwebhooks": "^1.0.0",
115114
"tslib": "catalog:repo"
116115
},
117116
"devDependencies": {
118117
"@edge-runtime/vm": "5.0.0",
118+
"cookie": "1.0.2",
119119
"msw": "2.11.6",
120120
"npm-run-all": "^4.1.5",
121121
"snakecase-keys": "9.0.2",

packages/backend/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig(overrideOptions => {
2121
bundle: true,
2222
clean: true,
2323
minify: false,
24-
noExternal: ['snakecase-keys'],
24+
noExternal: ['snakecase-keys', 'cookie'],
2525
};
2626

2727
const esm: Options = {

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)