提交 ca126548 编写于 作者: d-u-a's avatar d-u-a 提交者: qiang

fix: 编译到微信小程序时缺少自定义组件uniad的问题

上级 5c261453
......@@ -38,7 +38,9 @@ const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
module.exports = {
compile (source, options = {}) {
compile (source, options = {}) {
options.modules.push(compilerModuleUniad)
if ( // 启用摇树优化后,需要过滤内置组件
!options.autoComponentResourcePath ||
options.autoComponentResourcePath.indexOf('@dcloudio/uni-h5/src') === -1
......@@ -92,7 +94,6 @@ module.exports = {
}
options.modules.push(compilerModule)
options.modules.push(compilerModuleUniad)
if (options.mp.platform === 'mp-alipay') {
options.modules.push(compilerAlipayModule)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册