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
currently, svelte exports ssr.mjs for '.' when the 'node' condition is set.
This changes onMount to be a noop and allows treeshaking bundlers to remove browser-only code and imports from ssr bundles.
but using the 'node' condition can lead to problems, eg if something deno only used 'deno' condition, it would not get ssr.mjs.
It's also not in alignment with esm-env that is going to be used by sveltekit.
Describe the problem
currently, svelte exports
ssr.mjs
for '.' when the 'node' condition is set.This changes
onMount
to be a noop and allows treeshaking bundlers to remove browser-only code and imports from ssr bundles.but using the 'node' condition can lead to problems, eg if something deno only used 'deno' condition, it would not get ssr.mjs.
It's also not in alignment with esm-env that is going to be used by sveltekit.
Describe the proposed solution
use the browser condition, like esm-env by @benmccann
https://github.com/benmccann/esm-env
Alternatives considered
leave it as is, assuming the node condition is used for non-browser builds always
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: