Meteor 1.11 brings Apollo skeleton, Vue.js skeleton, and many more exciting updates including build performance optimizations and cache for deploys.
We started working on Meteor 1.11 right after Meteor 1.10.2 was released. We’ve been busy — there were 22 items in this release.
During the last months we have always kept our issues up-to-date, our PRs moving forward and our roadmaps updated on both Meteor and Galaxy.
The Meteor community has been contributing a ton, as always. We strongly encourage you, Meteor developer, to become an active contributor in the community if you aren’t one already. We will always rely heavily on our community to improve Meteor. It’s what keeps us moving forward.
Check out our roadmap for ideas on what to work on, or send us a message on Forums. Everyone is also strongly encouraged to join our Community Slack. We’d love to see you there!
Let's dive into a few highlights of 1.11:
Performance Improvements
We had multiple PRs improving the performance of our build in different parts (thank you Zodern):
- node_module watchers;
- realpath usage;
- enabled build in place on Windows;
- reduced watchers and stats what saves CPU.
If you were using Meteor on Windows and your rebuilds were taking longer than expected, we’d ask you to try it again.
Depending on the app these changes can result in up to:
- 40% less memory and 50% less CPU when idling between builds;
- Reduction in the number of times the disk is accessed during a build, or switched to lighter weight operations;
- On Windows, Meteor will only write modified files during a full rebuild instead of all files. This optimization was partially enabled for Windows in 1.8.1, and added for all other operating systems in Meteor 1.2;
- Other optimizations to remove unnecessary work and better use caches.
If your app takes more than 2 seconds to do a full rebuild, please help us improve. Use the build-profiler package to take a CPU profile and share it by opening a new Github issue and providing as much information as you can. We’d appreciate it!
Cache your builds
We are also introducing a new option in our deploy command: --cache-build . Using it in your deploy command Meteor will re-use your bundle if your git repository is in the same commit as the last time you deployed. Unless you are not deploying from a git repository, you should use this option all the time.
Cache build is helpful in two situations:
- Flaky connection: if your bundle upload is failing, sometimes you can retry without waiting the build time again — it will start the upload right away.
- Deploy to multiple environments: you can send the same bundle to multiple targets, for example, your staging and production environment. The second environment deploy will be faster as Meteor won't build your code again and you will be sure both environments are running the same exact bundle.
TL;DR: use --cache-build when deploying to Galaxy.
Galaxy Logs view also got better recently, watch this video where Renan explains what is new and how to use it.
Apollo skeleton
GraphQL is a query language to ask for data (queries) and to perform mutations in your server. One very popular implementation of GraphQL is Apollo. It was always possible to use GraphQL and Apollo with Meteor (we have many packages integrating these technologies), but we didn't have a simple one line command to create a new app with Meteor and GraphQL.
meteor create now supports --apollo as skeleton option. If you want to start a new project with Meteor using Apollo in the data layer you only need to run: meteor create myproject --apollo and you are good to go. Thanks Storyteller!
Your project will also use React, but if you want you can replace by any other UI Framework that you like most. We choose to integrate with Apollo in the skeleton using the apollo-server-express to keep the integration as simple as possible and easy to understand for non-Meteor developers as well.
We also have packages using Meteor WebSocket as the link for Apollo. This is great combination as you can use the power of EJSON combined with GraphQL. You can also use Meteor Methods or Meteor Publications where you believe they are going to work better than GraphQL sharing the same WebSocket connection.
Vue.js skeleton
Vue is a progressive framework for building user interfaces that is growing a lot in popularity. Now we also have a simple one line command to create a new project using Meteor and Vue: meteor create myproject --vue .
It's really ideal for Vue developers who want to try out Meteor for the first time, or for Meteor developers who would like to quickly get a project up to try out Vue on the client.
Meteor already supports hot module replacement with Vue so you will check your changes quickly and iterate faster.
Fixes and updates
1.11 also includes many fixes and updates such as:
- Node.js was updated to 12.18.3;
- MongoDB driver was updated to 3.6.0;
- MongoDB binary included in Meteor for development was updated to 4.2.8;
- Cordova integration was producing errors when removing Cordova plugins that depends on CLI variables;
- Email package was updated and now exposes hookSend that runs before emails are send.
You can update your Meteor project to 1.11 now running meteor update inside your project folder.
You can also install Meteor and start using it to create new projects. Want to publish your app? Galaxy Hosting offers 30-days free trial for up to 4gb’s of usage. You can also start using our domain .meteorapp.com so you don't need to buy a new domain to have a public version of your work!
Announcing Meteor 1.11 was originally published in Meteor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.