-
Notifications
You must be signed in to change notification settings - Fork 12
build: use UMD for browser bundle #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| net: false, | ||
| tls: false, | ||
| // TODO: support WebCrypto API in lib/common.js and uncomment this | ||
| // crypto: 'empty', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will both reduce the browser build size, like, three times, and also improve performance.
package.json
Outdated
| "./dist/cjs/lib/socket.js": false, | ||
| "./dist/cjs/lib/wss.js": false, | ||
| "./dist/cjs/lib/ws.js": "./dist/cjs/lib/ws-browser.js", | ||
| "./dist/cjs/lib/simple-auth-policy.js": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can also add:
"./dist/cjs/lib/simple-session-storage-provider.js": false
since it can only be used on server side.
|
I've rebased the branch on |
* Use UMD both for pre-packaged browser bundle and for usage with module bundlers * Update webpack to 4.x
* Use UMD both for pre-packaged browser bundle and for usage with module bundlers * Update webpack to 4.x PR-URL: #355 Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
|
Landed in 0ccd28d. |
* Use UMD both for pre-packaged browser bundle and for usage with module bundlers * Update webpack to 4.x PR-URL: #355 Reviewed-By: Mykola Bilochub <nbelochub@gmail.com>
Publish and export CommonJS modules transpiled with Babel for usagewith module bundlers