Skip to content
New issue

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

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

Already on GitHub? # to your account

看了下,API没有说明如何进行预编译,是暂时不支持还是将来也不支持? #39

Open
oxUnd opened this issue Sep 17, 2014 · 7 comments

Comments

@oxUnd
Copy link

oxUnd commented Sep 17, 2014

RT

@chriswong
Copy link
Member

我们觉得没必要....

@errorrik
Copy link
Contributor

暂时不支持。原因主要是,预编译后的代码肯定要比模板代码大,编译的代价并不高,毕竟是一次compile多次render。

如果是前端应用,对下载时间上的要求会更严格。对于后端应用,可能会需要预编译功能。所以,未来也会做。

现在来说,预编译功能暂时还没有schedule。

@leeight
Copy link
Member

leeight commented Aug 3, 2015

什么是预编译?

@weishai
Copy link

weishai commented Apr 22, 2016

原来没有预编译的。。。

@musicode
Copy link

musicode commented Mar 4, 2022

所以,未来也会做。

我的场景是,每个页面都要复用相同的 、polyfill,amd config,因此要用到母版,暂时没找到比 etpl 更好用的模板引擎

在 nodejs 渲染模板时,想做一层缓存,避免频繁的 IO 和 compile。现在的问题是,子页面的改动确实可以发现,但是如果子页面的母版变了怎么办?因此我想到预编译,把母版编译进每个子页面,这样就不存在这个问题。

但是,etpl 不支持预编译,卡在这了

@errorrik erik,etpl 还打算维护么?维护的话,我就等等,不维护我可能转向 mustache 了...

@otakustay
Copy link
Member

建议你转到mustache上比较好,etpl做预编译等于完全重新做一次实现了

@musicode
Copy link

musicode commented Mar 4, 2022

@otakustay ok

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants