Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import语法中如果import了一个不存在的target的提示信息是否需要完善下? #66

Closed
acelan86 opened this issue Aug 21, 2015 · 2 comments

Comments

@acelan86
Copy link

RT, 如果import了一个不存在的target是不是警告或者报错好些,因为错误在

// @etpl/3.0.1/src/main.js#986
              if (child instanceof ImportCommand) {
                    var target = engine.targets[child.name];
                    readyState = readyState
                        && target && target.isReady(engine);
                }

这个地方检查ready的时候被隐式吃掉了,只要有一个import不存在,会导致整个template出不来,这时候如果没有报错或者警告,很难跟踪到错误

@yankun01
Copy link

+1

@errorrik
Copy link
Contributor

受限🐟前端模板引擎对体积的要求,解析过程不是逐行逐字符扫,所以没法提示到具体行。

另外,前端模板不负责文件的load,只负责parse string,所以,也无法定位到文件。

只能输出一些错误信息。

erik168 added a commit that referenced this issue Dec 31, 2015
erik168 added a commit that referenced this issue Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants