I have a utils.js module which exports multiple, named, async functions. When importer.js imports one of these async function exports, Rollup is including all of them in the bundle. It seems that Rollup's tree-shaking algo is getting caught up with the async functions, when I removed the async/await keywords from the utils.js module, only the imported functions were included in the bundle, as expected. The way I worked around this was to put each function in its own module.
I'm using the latest versions of rollup, rollup-plugin-babel, babel-preset-stage-3, and babel-regenerator-runtime.
I have a
utils.jsmodule which exports multiple, named, async functions. Whenimporter.jsimports one of these async function exports, Rollup is including all of them in the bundle. It seems that Rollup's tree-shaking algo is getting caught up with the async functions, when I removed theasync/awaitkeywords from theutils.jsmodule, only the imported functions were included in the bundle, as expected. The way I worked around this was to put each function in its own module.I'm using the latest versions of
rollup,rollup-plugin-babel,babel-preset-stage-3, andbabel-regenerator-runtime.