baidu / san

A fast, portable, flexible JavaScript component framework
https://baidu.github.io/san/
MIT License
4.73k stars 551 forks source link

aPack编译丢失组件class #553

Closed luoyimaid closed 3 years ago

luoyimaid commented 3 years ago

子组件Text:

<div class="text">
            hello luoyi_maid!
</div>

父组件template:

<div class="searchWordItem">
            hello world!
            <text-demo class="componentText" />
</div>

如上,父组件中引入子组件,使用text-demo标签,这时标签上直接加的class="componentText"在经过apack编译后会丢失,只有子组件的class='text'生效

写了个Demo验证,可线下跑通测试:https://github.com/luoyimaid/san-template-loader

errorrik commented 3 years ago

线下解决了,是处理工具的逻辑问题。关