-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Description
Describe the problem
Sveltekit currently has an issue where components that have dependencies using browser features such as the window
and document
objects throw errors during the component module initialization, preventing the framework from checking the component's module exports and deciding whether the component is suitable for server-side rendering.
Describe the proposed solution
Adding a compiler option to lazily load the dependencies of a component's regular <script>
, allowing the framework to read the configuration of a page without loading modules that may be incompatible with the current environment.
Alternatives considered
Additional configuration options and special handler parameters
Importance
would make my life easier
Metadata
Metadata
Assignees
Labels
No labels