You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by Hanks Zhang <zh...@gmail.com> on 2018/01/03 06:34:39 UTC

Support import javascript files dynamically

Since Weex support using multi-contexts [1], js code is no longer executed
by js framework, it also breaks the "one js file for one page" limit. In
the other word, it's possible to run multiple js files (synchronously or
asynchronously) in one page.

I think the N-to-N relationship between Weex page and js code is more
flexible than one-to-one, and more complicate too. If Weex supports it,
features like code split, caching, lazy execution could be supported too.
But it also easy to be abused.

Before start thinking out the implementation details, I would like to
discuss whether should Weex support it at first.

[1] https://lists.apache.org/thread.html/87bf83253ed7ee318a8cf98d693bc5
34b3e08b4d28655a1290f2e0c7@%3Cdev.weex.apache.org%3E

Best Regard, Hanks