importmatcher,{filterByContent,insertToLastImport,replaceContent}from'/src/matcher'matcher({entry:'e:/HXL/工具/batch-handle-resource/test/data',rules:[{// 匹配 entery 文件夹下所有的 js 文件match:/\.js$/,use:[// filterByContent 用于过滤掉不存在该内容的文件filterByContent("import Header from 'src/components/Header/Header'"),// insertToLastImport 用于将该内容插入到最后一个 import 语句下面insertToLastImport("import { headerDictionaries } from 'src/components/i18n/header/config/i18n/en'"),// replaceContent 用于将替换文件内容replaceContent([{searchValue:"import Header from 'src/components/Header/Header'",replaceValue:"import Header from 'src/components/i18n/header'"},{searchValue:'<Header />',replaceValue:'<Header dictionaries={headerDictionaries} styles={headerStyles} />'}],true)]}]})