babel-plugin-dynamic-import-webpack icon indicating copy to clipboard operation
babel-plugin-dynamic-import-webpack copied to clipboard

Add babel helpers and support for named chunks.

Open gdborton opened this issue 8 years ago • 4 comments

@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

gdborton avatar Jun 27 '17 22:06 gdborton

@ljharb Added tests for applying the plugin w/ external-helpers.

gdborton avatar Jun 28 '17 00:06 gdborton

This may be considered breaking; thoughts?

ljharb avatar Jun 28 '17 04:06 ljharb

Hi what is status of this PR?

ondrejbartas avatar Jul 18 '17 11:07 ondrejbartas

@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.

gdborton avatar Jul 25 '17 22:07 gdborton