webpack-fast-refresh icon indicating copy to clipboard operation
webpack-fast-refresh copied to clipboard

Cannot read property 'push' of undefined

Open aladdin-add opened this issue 5 years ago • 5 comments

it was working in [email protected], but seems not working with the latest webpack and the plugin:

image

webpack: 5.0.0.beta.23 node.js: v14.5.0 webpack-fast-refresh: 5.0.4 react-refresh: 0.8.3

aladdin-add avatar Aug 04 '20 11:08 aladdin-add

I've created a simple repro: https://github.com/aladdin-add/issue7 (it was simplified from a private repo)

thanks in advance!

aladdin-add avatar Aug 04 '20 11:08 aladdin-add

having the same issue, as soon as you place ReactRefreshPlugin(), on plugins you get that error, last known setup is with webpack 5.0.0-beta.22 + webpack-fast-refresh 5.0.1

Agamennon avatar Aug 04 '20 18:08 Agamennon

Something's going on with html-webpack-plugin. I've never used it before but looking into it.

apostolos avatar Aug 05 '20 15:08 apostolos

In the meantime, I strongly suggest switching to https://github.com/pmmmwh/react-refresh-webpack-plugin

It is the "official" react refresh plugin and it looks to be working with html-webpack-plugin without issues. It also now has full support for webpack v5.

apostolos avatar Aug 05 '20 16:08 apostolos

The same for me after I've upgraded to webpack 5.0.0-beta.29

AlonMiz avatar Sep 13 '20 09:09 AlonMiz