提交 2fa7cd5d 编写于 作者: fxy060608's avatar fxy060608

feat(qa): view=>div

上级 fb9ed2de
...@@ -8,6 +8,7 @@ module.exports = config => { ...@@ -8,6 +8,7 @@ module.exports = config => {
.tap(options => Object.assign(options, { .tap(options => Object.assign(options, {
compiler: require('@dcloudio/uni-template-compiler'), compiler: require('@dcloudio/uni-template-compiler'),
compilerOptions: { compilerOptions: {
quickapp: true,
preserveWhitespace: false preserveWhitespace: false
}, },
hotReload: false, hotReload: false,
......
module.exports = {
preTransformNode(el) {
if (el.tag === 'view') { // view 是最常用组件,直接映射为div标签,保证性能
el.tag = 'div'
}
}
}
...@@ -72,9 +72,12 @@ module.exports = { ...@@ -72,9 +72,12 @@ module.exports = {
console.error(source) console.error(source)
throw e throw e
} }
} else if (options.quickapp) {
// 后续改版,应统一由具体包实现
(options.modules || (options.modules = [])).push(require('@dcloudio/uni-quickapp/lib/compiler-module'))
} }
if (!options.mp) { // h5 if (!options.mp) { // h5,quickapp
return compileTemplate(source, options, compile) return compileTemplate(source, options, compile)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册