Why is Meteor using imports in 1.3 tutorial

ぃ、小莉子 提交于 2020-01-06 19:52:15

问题


Why is Meteor using imports in 1.3 tutorial - it makes it harder to managed than before which I think is totally against the grain for what they wanted to accomplish from the start? Can I run files from 1.2 with 1.3? What are the advantages with the new file system, it's not clear in the tutorial? Thanks!


回答1:


What are the advantages with the new file system?

In the near term:

  • Module support gives you the ability to control your file load order. E.g. no more prepending numbers to file names, adding nested lib directories, and using packages where you otherwise wouldn't.

In the long term (meteor 1.4+):

  • Module support enables a number of future optimizations including code splitting, hot module reloading, and incremental rebuilding. See this discussion for more details.

Can I run files from 1.2 with 1.3?

Yes, the imports directory is optional. You can upgrade to 1.3 without using it. See this answer from Zoltan for more details.



来源:https://stackoverflow.com/questions/36898323/why-is-meteor-using-imports-in-1-3-tutorial

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!