mirror of
https://github.com/zuiidea/antd-admin.git
synced 2024-04-21 12:32:14 +00:00
18 lines
413 B
JavaScript
18 lines
413 B
JavaScript
module.exports = function(webpackConfig) {
|
|
webpackConfig.module.loaders.forEach(function(loader) {
|
|
if (loader.loader === 'babel') {
|
|
// https://github.com/ant-design/babel-plugin-antd
|
|
loader.query.plugins.push('antd');
|
|
}
|
|
return loader;
|
|
});
|
|
|
|
// Fix ie8 compatibility
|
|
webpackConfig.module.loaders.unshift({
|
|
test: /\.jsx?$/,
|
|
loader: 'es3ify',
|
|
});
|
|
|
|
return webpackConfig;
|
|
};
|