-
Hi there, I just recently upgraded from koa-body
I have attached an example project below that shows the issue. Anyone has any ideas how the above could be fixed? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think i figured it out. Koa-body (at the moment) uses formidable 2.x, which dynamically imports the plugins based on the plugin names specified via the
This is unfortunate, because from esbuild's perspective the plugins are non-analyzable imports, quoting:
Looking at formidable@v3 this issue seems to be resolved as the plugins are statically-defined imports. If anyone else runs into this problem, the above means that if you insist on using koa-body, you'd have to wait until they decide to use formidable@v3 or you could try to switch to Webpack to bundle your code (I don't know if Webpack would work though). |
Beta Was this translation helpful? Give feedback.
I think i figured it out. Koa-body (at the moment) uses formidable 2.x, which dynamically imports the plugins based on the plugin names specified via the
enabledPlugins
option. The relevant snippet from the bundled code:This is unfortunate, because from esbuild's perspective the plugins are non-analyzable imports, quoting: