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

Order of the import statements changes

Open yp opened this issue 6 years ago • 0 comments

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?

yp avatar Oct 26 '18 09:10 yp