Actually prevent Blaze and Jquery from being loaded on client

I have spent way too long trying to figure out which package still insists on reinstalling blaze and jquery (and serving it to the client). I’ve been through every one of the packages below, if they are found here. I’ve also been through the other related threads here to no avail.

Can someone help? Meteor show only does so much. I attempted to go through my packages one at a time but was unable to prevent jquery and blaze from being installed again. The meteor package, which seems to be need to do stuff like: import { Session } from 'meteor/session' adds Blaze and Jquery.

I think it is either meteor-base or meteor-platform, but not sure how to not install those while still getting the other ones I need.

At first I was trying to not have blaze/templating/jquery/boilerplate-generator in my versions file but gave up and hoped that blaze and jquery would only be loaded on the server, but I can confirm there are dozens of mentions of both in my meteor_js_resource in Chrome.

email@1.1.18
standard-minifier-css@1.3.2
standard-minifier-js@1.2.1
react-meteor-data
ecmascript@0.6.1
accounts-password@1.3.3
accounts-twitter@1.1.12
audit-argument-checks@1.0.7
check
browser-policy-common@1.0.11

mongo
session
meteor
random
autoupdate
livedata
meteor-platform

I also spent a lot of time trying to remove Blaze from my versions file, only to realize it’s only loaded server-side. Are you 100% sure you’re loading Blaze client-side?

Just figured it out (mostly, I think). I was missing static-html and had no idea I needed that (is it in the guide?). I had been using other packages to solve an invariant violation React error. Unfortunately there are still 8 blaze mentions on the client – not sure what that’s about but my bundle is about ~100KB smaller now, so at least I’m rid of Jquery.

Here’s my current packages; hopefully this can help others… Now to see if underscore can be removed from the client.

email@1.1.18
standard-minifier-css@1.3.2
standard-minifier-js@1.2.1
react-meteor-data
ecmascript@0.6.1
accounts-password@1.3.3
audit-argument-checks@1.0.7
check
browser-policy-common@1.0.11
static-html
mongo
session
meteor
ejson
random
ddp
autoupdate

… you can remove Blaze from your project by running:

  1. meteor remove blaze-html-templates
  2. meteor add static-html

Geez, thanks. :smile:

It is: https://guide.meteor.com/react.html#using-with-meteor . This package is recommended in most tutorials where you replace Blaze with something else (same for Vue).

Unfortunately you can’t really remove underscore, because many core packages depend on it, both on the server and on the client.

1 Like