Description
Describe the bug
Hi again (I'm assuming you want me to file a new issue, let me know if I should have added to the last one...),
The fix for #13238 worked great for my sample repo, but unfortunately not for my production build. After a bit of searching I figured out that the error
If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
reappears if you switch from adapter-auto to adapter-vercel.
--- a/package.json
+++ b/package.json
@@ -32,13 +32,14 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.3.1",
- "@sveltejs/kit": "^2.15.0",
+ "@sveltejs/adapter-vercel": "^5.5.2",
+ "@sveltejs/kit": "^2.15.1",
...
and
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -1,4 +1,5 @@
-import adapter from '@sveltejs/adapter-auto';
+// import adapter from '@sveltejs/adapter-auto';
+import adapter from '@sveltejs/adapter-vercel';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
...
I have updated the sample repo: https://github.com/thebjorn/sk-sync-bug
Do you want me to file a new issue or do you prefer to re-open this one?
Reproduction
See #13238 with the added diffs from above.
Logs
srv/work/sk-sync-bug❱ pnpm check
> sk-sync-bug@0.0.1 check C:\srv\work\sk-sync-bug
> svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
====================================
Loading svelte-check in workspace: c:\srv\work\sk-sync-bug
Getting Svelte diagnostics...
If bundling, conditions should include development or production. If not bundling, conditions or NODE_ENV should include development or production. See https://www.npmjs.com/package/esm-env for tips on setting conditions in popular bundlers and runtimes.
====================================
svelte-check found 0 errors and 0 warnings
srv/work/sk-sync-bug❱
System Info
System:
OS: Windows 11 10.0.22631
CPU: (48) x64 AMD Ryzen Threadripper 3960X 24-Core Processor
Memory: 41.83 GB / 63.88 GB
Binaries:
Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.15.1 - ~\AppData\Local\pnpm\pnpm.CMD
bun: 1.1.41 - ~\AppData\Roaming\npm\bun.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527
npmPackages:
@sveltejs/adapter-auto: ^3.3.1 => 3.3.1
@sveltejs/adapter-vercel: ^5.5.2 => 5.5.2
@sveltejs/kit: ^2.15.1 => 2.15.1
@sveltejs/package: ^2.3.7 => 2.3.7
@sveltejs/vite-plugin-svelte: ^5.0.3 => 5.0.3
svelte: ^5.16.1 => 5.16.1
vite: ^6.0.7 => 6.0.7
Severity
annoyance
Additional Information
No response