You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
I think it's something to do with the CommonJS proxy module re-exporting an ES Module - Webpack seems to be freezing something... somewhere (can't seem to find where).
Reacted by Armend Gashi, Dan Ruddy Watts, Jonny Buchanan and Shirsh Zibbu
Ok, that confirms it. Now I just need to figure out if it's Babel or Webpack doing the freezing. Other people will be running into this as libs switch over to shipping ES Modules.
@garmjs which version of preact-compat was that with? whoop, nevermind was thinking of a different issue. I'm actually not sure what we can do about this since RHL is doing something very odd.
For sure - RHL is trying to patch a frozen exports object for some reason. Not sure what the best way to fix this would be, it's just a very odd behavior for RHL.
@developit i'm having another issue with react-modal too, inputs are losing focus onChange, i don't know yet why need to check further and open an issue if needed.
@garmjs might be a bubbling issue. If something up the DOM tree accidentally registered an onChange handler on a random element like a <div> it'll trigger when blurring descendants.
So interesting enough, I have come back to trying and move my app to preact, but now I get an issue where the app is constantly rerendering if I use hot module reloading. If I remove 'react-hot-loader/patch' from the webpack entry config it stops. Any ideas what this could be?
Not sure, but RHL is on my list of things to figure out. I've never used it, all the apps I work on just use basic HMR, but I know people really want it. It's likely touching some internal stuff preact-compat doesn't emulate.
This fix works except it then causes issues with using react-dom/server
ERROR in Error: Cannot find module "react-dom/server"
at webpackMissingModule (webpack:///./html.js?:12:79)
at Object.eval (webpack:///./html.js?:12:172)
at eval (webpack:///./html.js?:114:30)
at Object../html.js (index.js:2425:1)
at __webpack_require__ (index.js:30:30)
at index.js:73:18
at index.js:76:10
at webpackUniversalModuleDefinition (index.js:3:20)
at index.js:10:3
at ContextifyScript.Script.runInContext (vm.js:53:29)
Reacted by Thom Nichols, MartonZ, Matt Distefano, Chris Dev, garrettmac, Lucas Farías and Stas
Activity
developit commentedon Mar 29, 2017
Hi there @dignifiedquire - are you using Webpack 1, or 2?
Something is freezing the exports of
preact-compat.dignifiedquire commentedon Mar 29, 2017
I am using
webpack@2.3.1, with the following babel configdevelopit commentedon Mar 29, 2017
I know this isn't the most elegant solution, but can you try adding this alias?
I think it's something to do with the CommonJS proxy module re-exporting an ES Module - Webpack seems to be freezing something... somewhere (can't seem to find where).
dignifiedquire commentedon Mar 29, 2017
This works :) thank you
developit commentedon Mar 30, 2017
Ok, that confirms it. Now I just need to figure out if it's Babel or Webpack doing the freezing. Other people will be running into this as libs switch over to shipping ES Modules.
garmjs commentedon Apr 6, 2017
webpack 2.3.2react-hot-loader v3Had same issue, that fixed for me too
developit commentedon Apr 6, 2017
@garmjs which version ofwhoop, nevermind was thinking of a different issue. I'm actually not sure what we can do about this since RHL is doing something very odd.preact-compatwas that with?garmjs commentedon Apr 6, 2017
@developit sorry forget to mention its
preact-compat@3.14.3garmjs commentedon Apr 6, 2017
btw just realized with this hot reload is not working
developit commentedon Apr 6, 2017
For sure - RHL is trying to patch a frozen exports object for some reason. Not sure what the best way to fix this would be, it's just a very odd behavior for RHL.
garmjs commentedon Apr 6, 2017
@developit i'm having another issue with
react-modaltoo, inputs are losing focusonChange, i don't know yet why need to check further and open an issue if needed.developit commentedon Apr 7, 2017
@garmjs might be a bubbling issue. If something up the DOM tree accidentally registered an
onChangehandler on a random element like a<div>it'll trigger when blurring descendants.dignifiedquire commentedon Apr 24, 2017
So interesting enough, I have come back to trying and move my app to preact, but now I get an issue where the app is constantly rerendering if I use hot module reloading. If I remove
'react-hot-loader/patch'from the webpack entry config it stops. Any ideas what this could be?developit commentedon Apr 25, 2017
Not sure, but RHL is on my list of things to figure out. I've never used it, all the apps I work on just use basic HMR, but I know people really want it. It's likely touching some internal stuff preact-compat doesn't emulate.
levibuzolic commentedon Jul 12, 2017
This fix works except it then causes issues with using
react-dom/serverdictions commentedon Sep 28, 2017
@developit that suggestion works to fix that error, but then causes
create-react-classalias to fail.