Skip to content

Conversation

@aqrln
Copy link
Member

@aqrln aqrln commented Aug 3, 2018

  • Publish and export CommonJS modules transpiled with Babel for usage
    with module bundlers
  • Use UMD for pre-packaged browser bundle UPD: and module bundlers
  • Update webpack to 4.x

net: false,
tls: false,
// TODO: support WebCrypto API in lib/common.js and uncomment this
// crypto: 'empty',
Copy link
Member Author

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
Copy link
Member

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.

@belochub
Copy link
Member

belochub commented Aug 4, 2018

I've rebased the branch on master to resolve the conflicts in package-lock.json

@aqrln aqrln changed the title build: improve browser build pipeline build: use UMD for browser bundle Aug 6, 2018
* Use UMD both for pre-packaged browser bundle and for usage
  with module bundlers
* Update webpack to 4.x
belochub pushed a commit that referenced this pull request Aug 6, 2018
* 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>
@belochub
Copy link
Member

belochub commented Aug 6, 2018

Landed in 0ccd28d.

@belochub belochub closed this Aug 6, 2018
@belochub belochub deleted the browser-build branch August 6, 2018 21:21
belochub pushed a commit that referenced this pull request Aug 30, 2018
* 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>
@belochub belochub mentioned this pull request Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants