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

1 Like