Closed prateekbh closed 6 years ago
@ev1stensberg @developit any ideas?
Could you give a code example if you have one?
@ev1stensberg Sure, Here I create a childCompiler: https://github.com/prateekbh/babel-esm-plugin/blob/master/src/index.js#L25
then I loop over every entry point and add them via SingleEntryPlugin
https://github.com/prateekbh/babel-esm-plugin/blob/master/src/index.js#L27-L29
This generates the bundles and chunks as expected. But, the bundles generated does not have
e.g. es5 bundles generated without this plugin say(index.js) will have this but the mirrored bundle (index.es6.js) will not have the same.
Is this the expected functionality: https://github.com/webpack/docs/wiki/internal-webpack-plugins#singleentryplugincontext-request-chunkname???
If yes, is there a plugin which can actually include this code?
I don't really know to be honest. @TheLarkInn might have some input on that.
I fixed this by adding https://github.com/prateekbh/babel-esm-plugin/blob/master/src/index.js#L40
Any assets created by
babel-esm-plugin
does not havewebpackJsonpCallback
to load the respective chucks.