Modules are loaded as needed(for xbrick ui)
npm install --save-dev babel-plugin-x-import
// in webpack.config.js
// ...other config
{
loader: 'babel-loader',
options: {
plugins: ['babel-plugin-x-import']
}
}
// before
import { Alert, AlertStyles } from 'xbrick'
↓↓↓↓↓
// after
import { Alert } from 'xbrick/lib/alert/Alert'
import { AlertStyles } from 'xbrick/lib/alert/Alert'