ssrwpo / ssr

SSR - Router with SSR for Node & Meteor
https://ssrwpo.github.io/ssr/
MIT License
93 stars 16 forks source link

html-minifier causes React to throw reconciliation errors. #45

Open cbilotta opened 7 years ago

cbilotta commented 7 years ago

The HTML minifier is not aligned with React rendering because it does things such as :

I don't know about other differences between the react rendering and the html-minifier, but we should search for them and make sure it doesn't cause problems in the future.

I guess, the html-minifier should simply not do anything except removing whitespaces between tags.

PEM-- commented 7 years ago

Indeed, concerning the inlined styles, this should be treated here: https://github.com/facebook/react/blob/master/src/renderers/dom/shared/CSSPropertyOperations.js#L172

cbilotta commented 7 years ago

Should I put an issue on React or html-minifier ? Not sure which one will listen 😄

PEM-- commented 7 years ago

I'm doing it right now. I'll reference our issue in FB's repo.

PEM-- commented 7 years ago

I've also referenced this issue on html-minifier as it should not alter inline styles when minifyCss is set to false.

cbilotta commented 7 years ago

I will make a commit where I comment the code responsible of making the minification happen for now. So we can keep on iterating the demo without having bugs.

cbilotta commented 6 years ago

From my understanding, this has been fixed in both react and html-minifier. I will do what is necessary to re-enable html minification in the develop branch and make sure it doesn't cause bugs anymore.