mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
26 lines
562 B
JavaScript
26 lines
562 B
JavaScript
|
|
import WindiCSSWebpackPlugin from 'windicss-webpack-plugin';
|
|
import { resolve } from 'path';
|
|
|
|
|
|
export default (api) => {
|
|
api.describe({
|
|
key: 'windicss',
|
|
config: {
|
|
default: {}
|
|
}
|
|
});
|
|
|
|
api.addEntryImportsAhead(() => [{ source: 'windi.css' }]);
|
|
|
|
api.chainWebpack((memo) => {
|
|
memo.plugin('windicss').use(WindiCSSWebpackPlugin, [
|
|
{
|
|
config: resolve(__dirname, '../windi.config.js'),
|
|
...api.config.windicss
|
|
}
|
|
]);
|
|
return memo;
|
|
});
|
|
};
|