weapp-plugin-replace
v0.1.1
Published
替换文件文本
Downloads
4
Maintainers
Readme
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'
}]]
},
],
};