Initial commit
This commit is contained in:
14
wechat-mini-program/node_modules/mp-html/plugins/card/build.js
generated
vendored
Normal file
14
wechat-mini-program/node_modules/mp-html/plugins/card/build.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
usingComponents: {
|
||||
'my-card': '../card/card'
|
||||
},
|
||||
handler (file) {
|
||||
if (file.isBuffer()) {
|
||||
let content = file.contents.toString()
|
||||
if (file.path.includes('parser.js')) {
|
||||
content = content.replace(/trustTags\s*:\s*makeMap\('/, "trustTags: makeMap('card,").replace(/voidTags\s*:\s*makeMap\('/, "voidTags: makeMap('card,")
|
||||
}
|
||||
file.contents = Buffer.from(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user