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
We need to make sure that all components that will be SSR'd have a precompiled template generated.
We need to make sure all templates that will be mounted will have a bundled version we can use to hydrate the client.
This weekend I spent some time studying Svelte's register.js function in an attempt to get on the fly compiling of SSR svelte components.
The biggest roadblock I hit was with packages that use ESM syntax.
Honestly, I don't know anything about ESM or CJS or anything around the debate. It has been something I've buried my head in the sand about for the past 2 years. That said, I think someone more experience could help simplify the rollup process and possibly help us compile SSR components on the fly.
It appears that we could use Rollup from within node, but this is something I haven't had a chance to test yet.
The text was updated successfully, but these errors were encountered:
All this said, upon further exploration I think we could use systemjs as a fallback and esm as the default by adapting some of the patterns seen in this repo: https://github.com/rollup/rollup-starter-code-splitting. This would give us robust browser support allowing new browsers to use ESM and older browsers to use systemjs.
It just adds more complexity to the rollup file though. 👎
On the plus side we may be able to only bundle the SSR components, then use something like nollup/vite/snowpack for development. Still more exploring to do.
Currently, one of the biggest drawbacks to Elder.js is the overly complex rollup config.
At the core we've got 2 issues.
This weekend I spent some time studying Svelte's register.js function in an attempt to get on the fly compiling of SSR svelte components.
The biggest roadblock I hit was with packages that use ESM syntax.
Honestly, I don't know anything about ESM or CJS or anything around the debate. It has been something I've buried my head in the sand about for the past 2 years. That said, I think someone more experience could help simplify the rollup process and possibly help us compile SSR components on the fly.
It appears that we could use Rollup from within node, but this is something I haven't had a chance to test yet.
The text was updated successfully, but these errors were encountered: