0.1.1 • Published 7 years ago
weapp-plugin-replace v0.1.1
weapp-plugin-replace
替换文件文本
安装
npm i weapp-plugin-replace -D使用
weapp.config.js
module.exports = {
  plugins: [
    ['weapp-plugin-replace', {
        match: /\.wxss$/,
        config: {
          find: /([0-9])px/,
          replace: (match, count) => {
            return count + 'rpx'
          }
        }
    }],
  ],
};module.exports = {
  plugins: [
    ['weapp-plugin-replace', {
      config: [{
        find: '1',
        replace: '11'
      },{
        find: '2',
        replace: '22'
      }]]
    },
  ],
};