Add babel helpers and support for named chunks.
@kesne @ljharb
This changes the plugin to use babelHelpers to return the resulting require rather than directly returning it. This should remain more spec compliant over time. Also, it adds support for named chunks via a preceding comment, following the same style as webpack@2.
If this goes through I'll put up a pr for https://github.com/airbnb/babel-plugin-dynamic-import-node.
This should address the concerns brought up in - https://github.com/airbnb/babel-plugin-dynamic-import-webpack/pull/13
@ljharb Added tests for applying the plugin w/ external-helpers.
This may be considered breaking; thoughts?
Hi what is status of this PR?
@ljharb Yes, this would be considered a breaking change. The babel interop helpers transforms the shape of the imported module if it doesn't include the property __esModule.
@ondrejbartas I let it sit for longer than I should've but am still hoping to get this merged.