Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// config file not ues ts
const { join } = require('path');
const babelMerge = require('babel-merge');
// 需要传入一个空对象,相关代码 https://github.com/umijs/umi/blob/master/packages/babel-preset-umi/src/index.js#L15
const umiBabelConfig = require('babel-preset-umi').default(undefined, {transformRuntime: {}});
/**
* 获取 css 插件
*/
const getCssPlugin = path => {
return [
'css-modules-transform',
{
preprocessCss: join(__dirname, 'less-loader'),
extensions: ['.css', '.less'],
generateScopedName: '[local]___[hash:base64:5]',
extractCss: path,
},
];
};