babel-plugin-import-separation
a plugin for babel to load on demand from import.
Where to add babel-plugin-import
Example
{ "libraryName": "antd" }
;ReactDOM; ↓ ↓ ↓ ↓ ↓ ↓ ;ReactDOM;
{ "libraryName": "antd", style: true }
;ReactDOM; ↓ ↓ ↓ ↓ ↓ ↓ ;;ReactDOM;
Usage
npm install babel-plugin-import-separation --save-dev
Via .babelrc
or babel-loader.
"plugins": "import" options