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
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
This is technically more of a general Svelte issue, but I feel it's particularly relevant to Sapper so I opened it here. Please let me know if I should move it to the svelte repo instead.
Sapper using both generate: 'ssr' on the server and hydrate: true on the client means that I'm not entirely sure how I'm supposed to publish components that will work out of the box (ie import FeatherIcon from 'svelte-feather-icon';).
"Normal" compiled components (with neither of those options set) work in Sapper when they're dynamic, but anything that's statically rendered (present on the page immediately instead of being dynamically added) will cause an error:
(node:14491) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)
Client error (when navigating to page from another route, from hydrate not being set I assume):
TypeError: feathericon._fragment.l is not a function
Server error (when accessing the route directly, from ssr not being enabled I assume):
TypeError: __WEBPACK_IMPORTED_MODULE_3_svelte_feather_icon__.a._render is not a function
Is there any solution besides telling people to import and compile the .html files directly?
The text was updated successfully, but these errors were encountered:
I suppose I could point main to the .html file, but I imagine most people set exclude: /node_modules/ by default in their webpack configs, so I'm not sure if that's a better solution.
This is technically more of a general Svelte issue, but I feel it's particularly relevant to Sapper so I opened it here. Please let me know if I should move it to the svelte repo instead.
Sapper using both
generate: 'ssr'
on the server andhydrate: true
on the client means that I'm not entirely sure how I'm supposed to publish components that will work out of the box (ieimport FeatherIcon from 'svelte-feather-icon';
)."Normal" compiled components (with neither of those options set) work in Sapper when they're dynamic, but anything that's statically rendered (present on the page immediately instead of being dynamically added) will cause an error:
Client error (when navigating to page from another route, from
hydrate
not being set I assume):Server error (when accessing the route directly, from ssr not being enabled I assume):
Is there any solution besides telling people to import and compile the
.html
files directly?The text was updated successfully, but these errors were encountered: