Meteor 1.5 with dynamic imports is officially released!

Congratulations to everyone who contributed, and especially @benjamn who built the core of the module system and dynamic imports!

53 Likes

Very exciting to see the new features of 1.5. This was desperately needed in my application as performance is #1 on my list and should be from the ground up. :grin:

4 Likes

This feature has probably been on the top of my wishlist for Meteor. Super excited to see it live. I am glad I did not switched to a different stack. Thank you @benjamn!

5 Likes

Wow. This is the first time I am really considering upgrading my 1.2 app :slight_smile:

7 Likes

This is great news! With 1.5 out and rolling, I must say “Meteor is the best thing ever!” :smile:

5 Likes

Please remember to run meteor remove bundle-visualizer before actually deploying your app to production, since you probably don’t want the visualizer to be visible to your users.

Everything else is great news, but this part is a bit disappointing. I love the visualizer, but forcing users to remove a package before building for prod is a strange request. I would expect to be able to just add the package and have it not included in prod bundles by Meteor itself, that seems sensical.

There’s a good reason for this - for the bundle visualizer to work your app needs to be in production mode so we can inspect the mini field size! Unfortunately that means it can’t be a development mode only package, and we didn’t want to build a special case into the build tool.

1 Like

Yeah I understand why from a technical standpoint it’s necessary, but this seems like one of those cases where adding a hard-coded special case might have its benefits for the user experience outweigh the technical debt introduced Or perhaps a new type of package could be created, something like “production-tools”, that’s included when run with meteor run --production but NOT when you run meteor build? There must be a more elegant solution

1 Like

Looks nice.

  • Was jQuery removed as a dependency of core packages? (Edit: No, still there)
  • Does 1.5 have tree shaking for dead code elimination like Rollup? (Edit: doesn’t seem to)
  • My bundle size increased from ~307 kb to 327 kb after upgrading to 1.5. Do the size improvements only come if using code splitting or removing packages?

Any limitations on using bundle-analyzer on a react app?

When tested with a fresh meteor 1.5 app, bundle-analyzer shows in the web browser and look awesome!

But when added to an existing project (meteor 1.5 + react), the terminal says bundle-analyzer is running, but the the bundle analyzer UI does not appear in the web browser and using dev tools it isn’t insert into the DOM, like on the test app.

Interesting, we have used it internally with several React apps. Do any errors get printed in the console?

1 Like

Good idea. Thanks @sashko

Based on this error, I ran npm install assert and the bundle analyzer works now! Maybe assert should be added as a dependency of bundle-analyzer?

2 Likes

me too thanks :slight_smile:

One idea for for bundle analyzer: Consider adding a command to meteor’s command line tools–e.g. meteor analyze or meteor size, possibly ship bundle-analyzer with Meteor, and then when meteor analyze is run, install the package locally, and when a SIGINT is received, remove the package and shut down.

Might be a bit complicated to set up, but from a user perspective, a single command would be awesome. meteor analyze could eventually accept a parameter for the reporter desired (e.g. --view ui, --view cli, etc), similar to how Mocha has different reporters.

Really neat to see this data! Great job everyone! Makes me really want to get rid of that the 96.5kb jquery though :slight_smile:

4 Likes

This is Awesome :slight_smile: I didn’t expect it to be here yet but incredible work as usual :slight_smile:

1 Like

Yeah I like this solution. It does seem like something that should be integrated into core and not as an optional dependency.

Awesome work. I look forward to seeing how much bundle size I can save on Vulcan!

2 Likes

Can you do a little write up or a blog post afterwards to show how much 1.5 has improved?
I would love to better understand how this all works.

I tried Meteor 1.5 with my current project (2 years project, been developed from meteor 1.2 till now).

One for the thing that i am extremely happy is the startup time very fast (compare to what I had in 1.4). Also, in the development mode, the final bundle file retrieved on the client reduces more than 1MB (from ~5.6 MB to ~4.3MB). I am not so sure if this is because of 1.5 or not, but this is a good update for me

Great work for the team

3 Likes

Great work Benjamn and team, really excited about this :):tada::confetti_ball:

2 Likes