wxmlfile/wxml-parser

[Bug]: cross file parse

Opened this issue · 4 comments

To reproduce:

// file1.wxml
<template>
  <import src="./file1.wxml"/>
  <block wx:if="{{ thing }}">
    <import src="./file2.wxml"/>
 </block>
</template>

Current behavior:
I can not get the file2 from ast

  • @wxml/parser version: 0.3.0
  • nodejs version: 16.x

I want to get file2 from ast.

Parser only work for single file. Did you mean that you want get file2.wxml ast to inject to current AST tree ? That's impossible.

yes,get file2.wxml ast to inject to current AST tree。Current can include file1 into ast tree。but file2 is not。。。。

So i think it is a bug。just because the tag with "if"。。。。

Yes this is I want。