-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
fix: Use css sourceMaps in development #591
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Could you please configure |
@mareksuscak I'm honestly not sure what you mean. I've never used I did a quick search through the |
Hm, how come? My link is pointing directly to the subsection where it's mentioned. See the attached screenshot with a red rectangle that highlights the particular subsection. It is also noted in the SurviveJS guide. See the pic below. Not sure if that has or hasn't been fixed. |
I see where it's mentioned - I've just never seen an example in the wild
|
Sure, will do when I get a chance today. |
As noted in Contributing.md, please include a test plan for this pull request. I don’t know how to verify that it works if you don’t tell me. 😉 |
I get a flash of unstyled content on Chrome 52 with this feature enabled. I’m not sure if it’s a Another area I’d like to see addressed is the performance impact. Can you create ~200 CSS files and measure first build and rebuild performance in development with and without this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to solve flash of unstyled content, and provide build performance measurements.
Apologies for the lack of response on this - I'm not really sure where to start looking for the problem here though my guess would be to start in |
Let’s close then as the implications are unclear. |
FOUC from style source-maps? And chrome 52 (just making sure I'm catching everything I'm reading here). Would be curious to see where those scripts are dropped on the page when rendered. |
I had some time today and here's what I've found. When you use I remember este.js suffered from FOUC in development env too in the past. Now they use JS styles. |
Wow, thanks for looking into it. That makes sense now. |
Thank you. Just my 2 cents, I'd say the dev env FOUC is worthwhile cost for extra source map features (which are handy). Especially if not affected in production (which makes sense now also). |
I'm worried that not only FOUC will be annoying, people will think it's something they did wrong, or worse, that it's React problem. These days people blame everything on React so we don't want to make it easier 😉 |
Lol good point! |
I got CSS sourcmaps and hot reloading working by following @mareksuscak's advice of changing my css loader in the webpack config to the following:
And I can't complain about FOUC (flash of unstyled content) - so all good for development! Hope tat may help someone here! 😎 |
|
Hi, Any update about css / sass sourcemaps in development mode (npm start) ? |
Fixes #590.
@gaearon this is a simple solution - and thanks to the comments in this file I don't think I'm missing anything? :)