inlineDynamicImports should work per output. For eg. I have a project with dynamic imports which I want to bundle for Modern Browsers(Chrome/Safari) using native dynamic imports. Also, I want to create an IIFE for IE11/FF, with the dynamic imports inlined in the output bundle.
inlineDynamicImports is a top level config option, making it all or nothing. The workaround is to have multiple configurtions and run rollup again but that is sub optimal.
Make inlineDynamicImports an output level configuration item.
@ashubham
Not sure if you are aware but your config can be a list, so you can specify multiple different configs.
export default = [
{
inlineDynamicImports: true,
...
},
{
inlineDynamicImports: false, // Technically this isn't required, just placing it here as example
...
}
]
Oh thats nice, I did not know it. Thanks @andrewebdev
Although, while it solves the issue there is still redundant code (like plugins, input etc). Which I agree we can work around by having common var for all the config.
Still, I think since its a property which transforms the output in some way it should be namespaced to output config item.
You might be interested to know that #3645 will implement what you originally suggested
Most helpful comment
@ashubham
Not sure if you are aware but your config can be a list, so you can specify multiple different configs.