babel-plugin-import
babel-plugin-import copied to clipboard
Order of the import statements changes
As far as I can tell, the plugin changes the order of the imports.
This can cause an issue when, for example, you load polyfills (for IE11) and antd
in the same file, since the the transformed imports go to the top of the transpiled file (thus before the polyfills) and, since antd
imports react
before the polyfills are loaded, we have the issue described here.
Is it possible to "rewrite" the imports in the same order of the original file? If not, is it possible to document this behavior?