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
No, I'm not planning on supporting that feature at the moment. That's not how the JavaScript specification works and esbuild tries to follow the specification. Note that esbuild's bundler already supports importing named exports from CommonJS modules without needing a mechanism like this.
Yes esbuild can bundle cjs module with named imports, with the downside of no tree-shaking on the cjs modules. This feature allows to mark a named export in es module as "module.exports", so that the input are all esm and tree-shaking still happens.
Rollup made this to support re-export in its commonjs plugin, so that it doesn't have to analyse too deep. I recently tried to repeat that plugin in esbuild and find that it requires such feature to be enabled in plugin side.
Anyway, it's ok if you're not planning to support it.
It is about importing named exports from commonjs modules, similar to this rollup feature.
It's good to know if you plan to support this feature, or as non-goal.
The text was updated successfully, but these errors were encountered: