mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
21 lines
464 B
JavaScript
21 lines
464 B
JavaScript
export default (api) => {
|
|
api.describe({
|
|
key: 'babelPluginImport',
|
|
config: {
|
|
schema(joi) {
|
|
return joi.array();
|
|
}
|
|
}
|
|
});
|
|
|
|
api.modifyBabelOpts((babelOpts) => {
|
|
if (api.config.babelPluginImport) {
|
|
api.config.babelPluginImport.forEach((config) => {
|
|
babelOpts.plugins.push(['import', config]);
|
|
});
|
|
}
|
|
|
|
return babelOpts;
|
|
});
|
|
};
|