问题
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