aui / art-template-loader

art-template loader for webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

include问题

xiabingwu opened this issue · comments

为什么使用
{{include ‘./preview/’+subType}} 会报错
显示的指出文件扩展名就不报错了
{{include ‘./preview/’+subType+‘.html‘}} 工作正常

修改默认的后缀名可以看下 art-template 的配置文档

image
是有配置的
{{include './subType'}} #编译通过
{{include '../../preview/'+subType'}} # 编译不通过
{{include '../../preview/'+subType+'.html'}} #编译通过

第二个多了一个逗号

那个是笔误,实际代码没有多引号,是{{include '../../preview/'+subType}} 没有编译通过。报错的信息是
image

等项目忙完了,我把demo准备好放进来