Skip to content
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

Hot Module Replacement with Webpack doesn't refresh in a dialog #299

Open
ClintGeense opened this issue Jun 8, 2017 · 4 comments
Open

Comments

@ClintGeense
Copy link

ClintGeense commented Jun 8, 2017

I'm submitting a bug report

  • Library Version:
    "1.0.0-rc.1"

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    7.10.0

  • NPM Version:
    4.2.0

WebpackVersion
2.4.1

  • Browser:
    all

  • Language:
    TypeScript 2.3.1

We are using Webpack's "Hot Module Replacement". This updates the view while running when changing .less files. When we want to style a dialog, this stops working. When I reload the page, the CSS is updated.

When the dialog is not opened, the page updates on save of the less.files.

@jmezach
Copy link

jmezach commented Jun 13, 2017

This is the exception we're getting when the dialog is open:

bluebird.js:1542 Unhandled rejection TypeError: Cannot read property 'lock' of undefined
    at UxDialogHeader.vendor_e20e2e25994cf48c7588../node_modules/aurelia-dialog/dist/native-modules/ux-dialog-header.js.UxDialogHeader.bind (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:7525:61)
    at View.bind (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:20319:22)
    at Controller.bind (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:22313:17)
    at View.bind (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:20325:22)
    at rerenderController (http://localhost:9000/scheduling.bundle.js:17289:17)
    at http://localhost:9000/scheduling.bundle.js:17042:187
    at Set.forEach (native)
    at HmrContext.<anonymous> (http://localhost:9000/scheduling.bundle.js:17042:61)
    at step (http://localhost:9000/scheduling.bundle.js:16857:23)
    at Object.next (http://localhost:9000/scheduling.bundle.js:16838:53)
    at fulfilled (http://localhost:9000/scheduling.bundle.js:16829:58)
    at tryCatcher (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:30853:23)
    at Promise._settlePromiseFromHandler (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:28875:31)
    at Promise._settlePromise (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:28932:18)
    at Promise._settlePromise0 (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:28977:10)
    at Promise._settlePromises (http://localhost:9000/node_modules/@rrwfm/rr/dist/vendor.bundle.js:29056:18)

@StrahilKazlachev
Copy link
Contributor

This is the only place where there is lock. Which means .settings is undefined - either it is not passed to the constructor or someone is messing up the DialogController.
Those who know how Webpack Hot Module Replacement works should check how it works with the DI and what are the implications, if any, of using Container.prototype.invoke.

@StrahilKazlachev
Copy link
Contributor

@jods4 @niieani any help will be appreciated.

@jods4
Copy link

jods4 commented Jun 26, 2017

@niieani is the brain behind HMR really, I am not too familiar with how it works sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants