webpack-hot-client icon indicating copy to clipboard operation
webpack-hot-client copied to clipboard

[WiP] HMR in a webworker

Open yurynix opened this issue 6 years ago • 2 comments

This PR contains a:

  • [x] bugfix
  • [ ] new feature
  • [ ] code refactor
  • [ ] test update
  • [ ] typo fix
  • [ ] metadata update
  • Replaces window -> (typeof self !== 'undefined' ? self : this)
  • Upgrades loglevelnext to 3.0.0

Motivation / Use-Case

I'm developing an app that is being executed in a webworker, so I don't have a window global available, I set target: 'webworker' in webpack.config and serving the file via webpack-dev-middleware on express.

This is a test branch to see if I can make it work.

  • I've replaced all occurrences of window to (typeof self !== 'undefined' ? self : this) via babel plugin, since that's what is used to build the client.
  • I've upgraded the dependency loglevelnext to latest version, since the old version has a reference to window https://github.com/shellscape/loglevelnext/blob/v1.0.5/dist/loglevelnext.js#L10

Breaking Changes

TBD

Additional Info

yurynix avatar Oct 22 '18 15:10 yurynix

@yurynix hi, how you can use webpack-hot-client?

alexander-akait avatar Oct 22 '18 15:10 alexander-akait

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

jsf-clabot avatar Oct 22 '18 19:10 jsf-clabot