import { ProjectFileProcessor } from '../type' export const updateCssVar: ProjectFileProcessor = ({ str, props }): string => { const { mobile, oneCode, themePackageName } = props if (!mobile || oneCode) { // pc if (themePackageName) { str = str.replace(/@alife\/theme-.*?\//gi, themePackageName + '/') } } else { // mobile str = str.replace(/\/\/ 如需使用主题 icons.*\n@/, '@') str = str.replace( /@alife\/theme-.*?\/variables\.scss/gi, '@alife/mobile-theme-coneb-rem', ) } return str }