Closed steveworkman closed 1 year ago
ToDo:
/\.js$/i
is not a regular expression 🤯However, with it in its current state, the nuxt 2 playground runs and builds in SSR mode without crashing and most of the components hydrate correctly. DSD is not added but that will be solved by the above changes
Today I replaced the @open-wc/import-meta-loader
with one that resolves local file paths rather than just webpack localhost ones. This is fine in dev, but it doesn't build, saying it can't find the module. If I get that to find the module, it complains that source.replace is not a function
- seemingly some objects other than strings are being passed through it, and it falls over.
Beyond that, vue-server-renderer
for nuxt 2 needs the fs
module that it is trying to load client-side, and beyond that, the latest nuxt
RC is causing the component that is loaded first to be added as another document fragment, instead of replacing the SSR one, I think due to https://github.com/nuxt/framework/pull/7527 or https://github.com/nuxt/framework/pull/7713.
I'm no longer sure that the current approach of wrapping components will work, and we should look at rendering hooks instead
Closing this for now. We can revisit it later if we want to add the Nuxt2 support.
Help nuxt2
Fixes #9
So far this is a refactor of the render code to split it for nuxt 2 and nuxt 3