Bundle and minify members.js

I think members.js can be bundled into the main js file and therefore be minified:

We’ll have one less request to the same domain!

The two files come from completely different sources. members.js is only injected when you’re using the members feature and comes from core so it can be updated as members features change. The main JS files (of which there can be many) are all user-provided in the theme and it’s not expected that Ghost will mess with those in any way. There’s no on-the-fly bundling or compression of JS files.

I expected such a response stating that members.js won’t mess with the theme. Okay, fine.

I think you can instead serve the minified version of members.js - https://github.com/TryGhost/Ghost/blob/master/core/server/public/members.min.js


Minified members.js file handling has landed in master with Added minified members.js file handling · TryGhost/Ghost@258bcc7 · GitHub, will be included with next release of Ghost (most likely 3.9.0)

1 Like