Open pi0 opened 1 year ago
From linked issues, a common problem was, externals.inline
is not being effective. inlined runtime dir by nuxt-turnstile using node's fileURLToPath has backslash and not matching fixed by https://github.com/unjs/nitro/commit/0638f6446e94f02032f51740cc5201ca4d98fcdf and nuxt-security not including it at all (https://github.com/Baroshem/nuxt-security/pull/84)
In addition, Nuxt has to automatically add transpile[]
to externals.inline[]
i belive for best DX. (we need downstream issue @danielroe )
Also while most of the cases with plugins and middleware need to be inlined, it seems there is still an strange behavior by rollup that even when returning {id: 'file://...', external: true}
from resolver it trims it out from final bundle. I will try to investigate this more but probably better if we have a pure nitro reproduction first for this. It might be also a case with unimport.
Linked issues:
They were fixed by https://github.com/unjs/nitro/pull/732 and https://github.com/unjs/nitro/pull/733 but since fixes introduced new issues (https://github.com/unjs/nitro/issues/808), reverting on 2.x edge until finding a new solution.