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
Presently (0.8.17), when marking a dependency as external (via externals argument or custom onResolve plugin), the original import syntax is preserved instead of being transformed to match that of the output format.
For example, when bundling a cjs file to esm:
constms=require('ms');module.exports=ms('10m');
...with externals: ['ms'] and format: 'esm' results in:
Presently (0.8.17), when marking a dependency as
external
(viaexternals
argument or customonResolve
plugin), the original import syntax is preserved instead of being transformed to match that of the outputformat
.For example, when bundling a cjs file to esm:
...with
externals: ['ms']
andformat: 'esm'
results in:...which preserves the original
var ms = require("ms")
instead of transforming toimport ms from "ms"
to match the output format.Perhaps it's out of scope, but fixing something like this in user space, without access to the AST, would be quite error prone.
The text was updated successfully, but these errors were encountered: