So far, so good, JQuery is gone, and my app is only 70 kb after deploy.
But then, I need the static-html package, so I can add some stuff in the head and body of my page.
meteor add static-html
It works fine, but now, JQuery is back, and my app weight 103 kb.
I really don’t understand why static-html can possibly need JQuery.
Is it a bug?
I use meteor 1.2.1
I am not sure, but I think that with meteor 1.2.0, I didn’t have this problem.
I am pretty new to this, but as far as I understand it, when you install that package, it will install all the dependencies as well. Which is why people like the packaging system because it takes care of all that for you…
I agree that somewhat undermines the stated purpose of the package.
Mostly useful if you want to use Angular or React as your view layer and just want to get some static HTML content on your page as a render target for your view framework.
I’m aware - there’s a github issue about it. Basically the static html package actually adds the body attributes via JavaScript, and that part depends on jquery. I’d love to accept a pull request changing that.
I removed the official static-html package from my project and then replaced it by a custom package, in the packages folder.
This custom package is the same as the official one, except that I removed the JQuery dependency in package.js.
It works fine and JQuery is gone.
Of course, I can’t add attributes to the body tag anymore, but I don’t care.