feat(app:socket.io): build socket.io into vendor.js - #455
Conversation
|
grunt-changelog can't parse commits with colons in the scope i.e: (app:socket.io) Could you change the commit message? |
|
Doh! Sorry, will do. One quick thought... |
|
👍 Sounds good. |
Changes: - Move socket.io script tag inside vendor.js build - Add `node_modules` to vendor script locations - Change socket.io path to `/socket.io-client` in serve and client - Will not serve socket.io.js when server is ran in `production` env - Add `socket.io-client` to package.json for a more consistent build
|
@DaftMonk, in |
feat(app:socket.io): build socket.io into vendor.js
|
Thats ok, I got it. |
There was a problem hiding this comment.
We moved the socket.io script tag inside the usemin build block so it will get included in vendor.js. We add node_modules to the search glob for the build, and change the path to socket.io-client/... since we install socket.io-client as a dependency. That way the paths all line up nicely and we still use the same script that socket.io would serve.
There was a problem hiding this comment.
If you take a look at the server and client scripts where we setup socket.io, you should see where we've adjusted the paths to match.
Changes:
node_modules/socket.io/node_modulesto vendor script locations/socket.io-clientin serve and clientproductionenv