You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?
It's just annoying and extremely hard to debug.
Note: the more honest and specific you are here the more we will take you seriously.
Additional context
Also happens on node 15
Happens on npm run dev as well
I couldn't reproduce it with other objects, only with process.env.SOMETHING
The text was updated successfully, but these errors were encountered:
Describe the bug
SvelteKit compiles some nonsense empty object when using
process.env.SOME_KEY
, and works fine when usingprocess.env["SOME_KEY"]
.Logs
No relevant logs, the build process works just fine.
To Reproduce
npm init svelte@next empty-obj
cd empty-obj
src\routes\todos\_api.js
:npm run build
.svelte-kit\output\server\app.js
file"PATH"
and check the output code, the code looks like something like this:You can see in the output that there is an
{}.PATH
, this is incorrect and very hard to debug.Expected behavior
Both
process.env.PATH
andprocess.env["PATH"]
should work just fine and have the correct output.Information about your SvelteKit Installation:
Diagnostics
System: OS: Windows 10 10.0.19042 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 17.00 GB / 31.80 GB Binaries: Node: 16.2.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 7.11.2 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 90.0.4430.212 Edge: Spartan (44.19041.964.0), Chromium (90.0.818.62) npmPackages: @sveltejs/kit: next => 1.0.0-next.109 svelte: ^3.34.0 => 3.38.2Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?
It's just annoying and extremely hard to debug.
Note: the more honest and specific you are here the more we will take you seriously.
Additional context
npm run dev
as wellprocess.env.SOMETHING
The text was updated successfully, but these errors were encountered: