Giter Site home page Giter Site logo

Comments (16)

glenjamin avatar glenjamin commented on May 2, 2024 4

Released as 2.10.0

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

"Not Accepted" errors are almost always because of a mistake or bug in the apply() code/handler.

Do you see the same issue on webpack v1? 2.0 is pretty new - I don't know whether the HMR code has changed much, but it could be related.

from webpack-hot-middleware.

bayov avatar bayov commented on May 2, 2024

Update:
The issue doesn't appear when using [email protected].

But there are two small issues which I'm not sure are even solvable:

  • Cannot hot-reload React stateless functional components.
  • Cannot hot-reload components provided to my router (page components). Sometimes HMR logs that the component was successfully updated but it isn't really updated, and sometimes I receive a warning for the same component:
[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

How much do you need the v2 changes? Sounds like it might be best to stay on v1 for now if you're pressed for time to deal with such issues.

from webpack-hot-middleware.

bayov avatar bayov commented on May 2, 2024

Yeah, I've now already gone back to webpack v1. I'll upgrade when it is a bit more stable. Thank you!

from webpack-hot-middleware.

phaistonian avatar phaistonian commented on May 2, 2024

Any news on this one?

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

I've not had a chance to look into any of the webpack 2 stuff yet.

Any help is appreciated.

from webpack-hot-middleware.

rmarscher avatar rmarscher commented on May 2, 2024

As @SosZ uncovered, the signature for module.hot.check has changed in webpack 2 to using promises instead of a callback. The new version of only-dev-server.js uses then() and catch() instead of a callback. I think it's possible to support both the webpack 1 callback and the webpack 2 promise. I submitted pull request #85. Hope that helps.

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

Keeping the issue open until the fix is confirmed. If anyone is able test the master branch and feed back that'd be great.

from webpack-hot-middleware.

rmarscher avatar rmarscher commented on May 2, 2024

It turns out that the pull request I made only fixed this error message. There are other errors to get things working properly with webpack 2. I'm working through some of them. Hopefully they can all be done without breaking compatibility with webpack 1.

from webpack-hot-middleware.

rmarscher avatar rmarscher commented on May 2, 2024

I submitted a new pull request to take care of the change in webpack 2 to module.hot.apply(). I don't see anything else in process-update.js that needs to be updated.

from webpack-hot-middleware.

rmarscher avatar rmarscher commented on May 2, 2024

The master branch is working as designed for me. @SosZ are you able to re-test? You would need to update your package.json to have the latest version of webpack 2 and webpack-hot-middleware pulled from the master branch.

    "webpack": "^2.1.0-beta.4",
    "webpack-hot-middleware": "git+https://github.com/glenjamin/webpack-hot-middleware"

I am working on a project that doesn't use react, but it uses monkey-hot-loader instead. I had to patch monkey-hot-loader to replace named export functions and be able to parse the es2015 source. jlongster/monkey-hot-loader#5

from webpack-hot-middleware.

bayov avatar bayov commented on May 2, 2024

Thank you! But I won't be able to test for a while.

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

@phaistonian would you be able to try this out and confirm its working ok?

from webpack-hot-middleware.

glenjamin avatar glenjamin commented on May 2, 2024

I've done a bit of testing myself, looks to be working correctly on webpack 2 and webpack 1.

Will aim to release later today unless someone else spots an issue.

from webpack-hot-middleware.

phaistonian avatar phaistonian commented on May 2, 2024

@glenjamin I will give it a try the soonest, though I am afraid the release will come first since I have a hectic day to deal with.

from webpack-hot-middleware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.