-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap update #10811
Roadmap update #10811
Conversation
Roadmap.md
Outdated
|
||
Making it possible to remove (or dynamically load) large dependencies like `jquery`, `underscore`, and `minimongo` will have a significant impact on bundle sizes. | ||
Have a ultra-thin version of Meteor that does not depend in anyway to mongo. Allow completely shutting down DDP and dependencies on DDP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have looked into this few months ago and in fact it works pretty well, the only issue is that hot-reload currently uses DDP: #9960 I think that should be moved to its own socket and used that. See more discussion here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mitar , I just added these links to the description.
Are you willing to be one of the leaders in this item?
Roadmap.md
Outdated
|
||
Using `Cache-Control: immutable` to cache the initial JavaScript bundle will reduce the amortized cost of downloading the initial JavaScript bundle in newer browsers. | ||
Make sure we are not delivering any dependency that is not used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mitar , I also added these links to the description.
Are you willing to be one of the leaders in this item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly I am currently swamped with other projects, so my love for Meteor is on the side. :-(
|
||
1.3 introduced `npm install` support along with ES2015 modules. In the future, we would like to transition the Meteor package ecosystem over entirely from Atmosphere to npm. We are still in the early conceptual design phase and expect to update the roadmap once we have a design in place that will underpin further development. | ||
Migrate packages that do not depend on Meteor exclusive features to NPM and we also continue to encourage new packages to be published as NPM packages when possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to move some core Meteor packages to NPM first.
The question though is how to have features like legacy builds on NPM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be great to move some core Meteor packages to NPM first.
The question though is how to have features like legacy builds on NPM.
Can't the packages be published as ES2019 or whatever and then Meteor can compile whatever bundle it needs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. The whole point of legacy targets in Meteor packages is that you can have literally different code for legacy. It is not just a question of compiling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but not that many packages have separate legacy code. So all of the ejson/tracker/random/minimongo/... stuff could probably quite easily be published as npm packages since most has been modernized already. This would split Meteor more in framework functionality published on NPM and build system. Some stuff like the fetch package falls somewhat in between. So while far from complete, it could be a good first step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Svelte uses a special key in package.json files. Something like that could work for meteor - it should be possible to map every meteor package API to a property on a meteor key. The specific bundles could still be created as they are now using tooling. I remember Ben had some issue with doing that. Maybe it's worth getting his 2 cents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you both! To the list I would also add the server-side stuff. That also does not need legacy code. So it would be great it oplog tailing would be a NPM package. People could then use it in other contexts and I think that would bring a lot of optimizations into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've recently been playing with integration into webpack for React Native and NativeScript. It'd be great if there was a top level way to pull assets into webpack for client bundles. If moving packages to npm would help do that, I'm all for it.
Enabling WebPack builds for the client bundle could also be a nice way to gain some features on this list which already exist over there - such as leveraging WebPack Offline for a Service Worker, and some PWA manifest tools. I've already tried it, and it's pretty nice. It just needs a few things - in particular, a meteor module loader (or reify-loader more specifically) would be nice, and maybe a dynamic-imports loader to keep perfect code splitting, and maybe port the modern/legacy bundle split to webpack somehow (webpacks method for modern/legacy bundles leaves a lot to be desired).
Roadmap.md
Outdated
|
||
## Different JS bundles for modern versus legacy browsers | ||
Improve index support for Minimongo to enable better performance in the client for databases with thousands of documents. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a low hanging fruit is: #10703
|
||
Most other Node applications work this way by default: every module is lazy, and therefore must be imported by another module, and evaluation starts with one "entry point" module (typically specified by the `"main"` field in `package.json`). | ||
### Update Angular Tutorial |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add Vue Tutorial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes @mitar , Vuejs tutorial is listed in the topic First-class citizen Technologies
|
||
*Status: Shipped in 1.4* | ||
- Status: shipped in Meteor 1.6.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really. One of big selling points of Meteor is drop-in accounts. I think those should also be made so that database connection can be swapped to different database backends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few items that I would like to add to the roadmap in the next cycle, one of them is the accounts system independence
- Improve accounts system
- HTTP/2 Websocket Support
- Improving MongoDB Oplog Tailing
If someone is willing to take the lead now we could include already.
Roadmap.md
Outdated
|
||
## Page load performance improvements | ||
Implement tree shaking / dead code elimination, which involves pruning the dependency tree while scanning imports in the `ImportScanner`. We believe it should be possible to treat values like `Meteor.isProduction` as constants during this process, and eliminate those branches if their conditions are false, so that the `./routes` dependency would not show up at all in the production bundle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the "routes dependency" referred to here? seems out of context...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right :) fixed.
Roadmap.md
Outdated
|
||
### Better dead code elimination | ||
Explore ideas to improve rebuild time such as split main client bundle into several bundles, split the server bundle into several bundles, store less file content in memory, etc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling the legacy build (at least in dev mode) could also help here for people that don't care about old browsers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to help @zodern on this as a leader?
Roadmap.md
Outdated
|
||
Using `Cache-Control: immutable` to cache the initial JavaScript bundle will reduce the amortized cost of downloading the initial JavaScript bundle in newer browsers. | ||
Make sure we are not delivering any dependency that is not used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR of me is related to this: #10792
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great @sebakerckhof . do you want to be one of the leaders of this item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean to be 'a leader of an item'? Because although I've done some related PR's recently (e.g. also the jquery stuff), my availability is highly dependent on workload of my actual job, so I might have some months without any time. If that's ok, you can add me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The leader is someone interested to guide the work but not necessarily to work in the item. Usually would be someone who understands what is necessary to make an item reality.
Roadmap.md
Outdated
|
||
## Page load performance improvements | ||
Implement tree shaking / dead code elimination, which involves pruning the dependency tree while scanning imports in the `ImportScanner`. We believe it should be possible to treat values like `Meteor.isProduction` as constants during this process, and eliminate those branches if their conditions are false, so that the `./routes` dependency would not show up at all in the production bundle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also be done for isServer
/isClient
. But you can only eliminate these branches if everything within them is block-scoped. Function-scoped variable declarations are hoisted outside of them, so you may break stuff if you remove the whole branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the kind of thing that a good minifier can figure out, once we tell it to consider expressions like Meteor.isServer
as constants—which I agree is a great idea!
# Conflicts: # ISSUE_TRIAGE.md
- incorporates feedback
I'll hoist this question - what do you all think of adding first-class WebPack support to Meteor? The idea is not to replace meteor's build system with webpack, at least not right away. And this suggestion is not meant as any kind of condemnation of Meteor. The main thing I'm after is access to the wide swath of tools that are available for WebPack, in particular tools like WebPack Offline (which has a decent default Service Worker), and integration paths for 3rd party tools like React Native, NativeScript (and the various tools built on top of that like Svelte Native and Vue Native), and possibly even with Cordova. I'm probably oversimplifying, but this is what it looks like it would take:
There is already a pretty nice nice tool for doing this in @ardatan's Meteor WebPack. It'd be great if that could be a first-class tool, integrated with Meteor. It'd also be great if the paradigm could be reversed (if needed) so that WebPack cold reach in to Meteor, instead of being part of Meteor the way it is in Meteor WebPack. The reasoning for that reversal (or alternative) is to allow NativeScript and React Native (and maybe Cordova) to run unmodified on their own, outside of Meteor, and pull out the parts they need. There is another project which kind of does it that way, but it's more limited than Meteor WebPack. It's nice because once it's set up (and probably using something like I see this kind of 3rd party integration as an almost feature story for Meteor. It just needs a bit more work - it's seems close to me. |
@CaptainN I appreciate the depth of your question, but those bullet points are all deal breakers for me, for the following reasons:
I know this isn't what you want to hear, but if you really want to use Webpack with Meteor, I recommend using it to publish npm packages that your Meteor application can consume, so that the Meteor development experience does not have to bear the cost of running Webpack (or any other additional build step) as part of its default build pipeline. As for React Native, from my limited review of the options, I imagine Meteor could play a role similar to Haul, except with its own build system instead of Webpack. Have you heard/thought about that? Storybook 5.2 demonstrated that it's possible for a tool that usually relies on Webpack to load its assets directly from a running web server (see storybookjs/storybook#5975 (comment)), which makes me optimistic about the future of using Storybook with Meteor. However, Storybook is loading compiled assets, whereas Webpack would presumably want to do some compilation itself, so I'm not sure this technique makes as much sense for Webpack. In general, I would rather implement Webpack-like features within Meteor than tie the two projects together in any direct way, because I want to keep Meteor as nimble as possible, so we can embrace the big changes in JavaScript module delivery that are still over the horizon. It's almost 2020 and the JS community is still struggling to use ES2015 modules natively in the browser. Webpack is benefitting from this painful transition period, and it has good reason to preserve the status quo. The future of JavaScript modules does not belong to bundlers, and Webpack would have to transform itself dramatically in order to stop being a bundler. tl;dr I still have big plans for the future of Meteor's module system, and I don't see a first-class role for Webpack in that vision, but I'm open to ideas about generic features that allow interop with third-party tools like Storybook or Webpack or Jest, to name just a few. |
@benjamn I'm always interested in the truth - so I appreciate the in depth answer. I agree broadly about not wanting to add an expensive additional stage to the build system. What I'm ultimately after is a way to use Meteor, and it's internal client side libraries (and some atmosphere packages), for projects on external tools like RN and NS (and derivatives - and to a lesser extent, gaining access to WebPack features - obviously, a proper Meteor version of the various tools would be preferable). I suggested a way to get there because I almost have it working, not because its necessarily the most optimal way to get there. I guess don't actually care as much about how we do ultimately get it working, as long as it's not fragile or too slow (but I'm glad you do care!). I also understand what you are saying about being a good JS community citizen, and not abandoning some principles about how to help move everyone forward on modules - that's good stuff. I haven't heard of I have thought about how Meteor might be the build tool for additional client targets - I'd love to see that actually, for a lot of targets - like service workers, web workers, etc. - making that open ended would be pretty awesome. To me from the 10,000 mile high perspective though, moving to WebPack, is kind of like decoupling Blaze. In a way, my suggestions have an unmentioned ulterior motive - which is to move some of the maintenance of core components out to third party efforts (like WebPack, or the way the view layer is now React or Vue - maintained by third party communities). I understand wanting to keep Meteor doing things the meteor way though, and the specific reasons you listed for doing that sound great to me! Anyway - I still want to sue Meteor with RN and NS! As I mentioned, I almost got the two solutions I mentioned above working. Most of the problems I have had is with Meteor packages that assume a browser execution context - leading to errors like undefined globals like I wondered if it could be improved by adding a dependency tree as json to the output in The other package, Meteor WebPack, does it the other way - it adds an additional build stage. It was WAY easier to set up than the other, in my limited testing, but has its own limitations (including losing perfect code splitting and modern bundles). But I'm not sure how I'd integrate that in to the NS or RN build stages, which run their own bundlers. If I wanted to gain access to additional webpack tools like WebPack Offline, this is how I'd probably do it. |
After a quick glance at Webpack Offline, that's definitely something I'd like to support natively in Meteor. We could either use a I'm also very interested in making React Native work with Meteor's build tool, since the RN team has fixed most/all of the barriers that used to give their bundler an exclusive advantage, such as the If we had a way to generate I got in a little trouble with Cordova fans the last time I advocated for React Native support, so let me be clear: I am not hoping to replace Cordova with RN, though I do hope there is some overlap between them, so we can use the same tools to support them both simultaneously. |
A couple of notes on
WebPack Offline uses client side feature detection to determine whether to use WebPack Offline has 3 main levels of caching for defined assets:
In WebPack Offline, these are defined in a JSON structure in the webpack config, and we could keep that or do something similar. But maybe we could also add some active default folders for static assets in When Meteor's An additional nice to have would be the ability to cache an index page that is distinct from whatever the current route produces from SSR. That's another limitation of |
I'll all on into the And I think that also needs some modification in some core packages like
As for DDP, Hot Code Reload shouldn't rely on it. And, cherry on the cake, I'd be marvellous to have to possibility to load |
@Fen747 |
@benjamn I just took a closer look at what you were talking about above about adding a native.react.{ios,android} build target, and completely agree. Maybe the place to start would be to work through the meteor build core, and break out the Cordova stuff, and replace that code in core with a common interface? I assume most of the places where we'd need checks for alternative build targets (like RN, NS, or SW) would be in similar places to where Cordova already is. If we could get the generic hooks in those places, maybe that'll create a way forward. To be honest, I took a look at that stuff a year or two ago, and couldn't figure out how to get it done. It'd be so great to use Meteor to build RN client, because let me tell you - Metro is flaky! (at least on Windows/Android). Haul demonstrates a scope of work to get Meteor to that point. For many of those listed packages, equivalents already exist in Meteor. Pretty neat idea. |
Just a heads-up regarding the discussion about AppCache, it will be removed in Chrome 82. |
Where can I find information on how to use this "ultra-thin" version of Meteor (without MongoDB)? |
Roadmap update.
We are proposing a new format for the roadmap where community members are involved since the beginning.
This is a call for community leaders to step up and help in the future of Meteor.