Open flamrdevs opened 11 months ago
Unfortunately there currently isn't, but I'll look into adding it
Hey @okikio , first of all thanks for the amazing work.
It would great if we can automatically add peerDependencies
in the npm package.json into esbuild.external
config.
For example, an React UI npm package usually has "react" and "react-dom" as peer dependencies, in the default config we should have:
{
"esbuild": {
"external": ["react", "react-dom"]
}
}
@szhsin I'm hesitant to enable that by default for react
, as people still check the raw bundle size of react
, but what I will do instead is support an auto
option that automatically marks peerDeps as external.
Sorry @flamrdevs I forgot to enable this feature last year, I'll be enabling later this week.
Is there a config shortcut to auto externals
dependencies
/peerDependencies
?Something like this