| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
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! |
Sorry, something went wrong.
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Sorry, something went wrong.
|
Could you please configure publicPathas per the css-loader's docs to ensure source maps work correctly? |
Sorry, something went wrong.
|
@mareksuscak I'm honestly not sure what you mean. I've never used publicPath and haven't had any issues with css-loader's sourceMaps. I also don't see a documented example. I did a quick search through the css-loader codebase and couldn't find any references to publicPath either. Could you help me out? |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
I see where it's mentioned - I've just never seen an example in the wild
|
Sorry, something went wrong.
|
Sure, will do when I get a chance today. |
Sorry, something went wrong.
|
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. 😉 |
Sorry, something went wrong.
|
I get a flash of unstyled content on Chrome 52 with this feature enabled. I’m not sure if it’s a css-loader, browser bug, or something else, but it’s annoying and will confuse our users. Could you look into why this happens? 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? |
Sorry, something went wrong.
There was a problem hiding this comment.
Need to solve flash of unstyled content, and provide build performance measurements.
Sorry, something went wrong.
|
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 css-loader. I don't have the OSS cycles I'd like to dedicate to this, unfortunately, so someone can feel free to take or close this. |
Sorry, something went wrong.
|
Let’s close then as the implications are unclear. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
I had some time today and here's what I've found. When you use ?sourceMap option with css-loader, instead of using style tags with inline styles, webpack injects style tags that reference the dynamically generated files (source maps likely don't work well with the inline style tags). Hence we need to load a few more files after we've already run the JavaScript part which obviously causes FOUC as the HTML has already been appended. Not sure if there's a cure for that. Production env should not be affected at all. I remember este.js suffered from FOUC in development env too in the past. Now they use JS styles. |
Sorry, something went wrong.
|
Wow, thanks for looking into it. That makes sense now. |
Sorry, something went wrong.
|
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). |
Sorry, something went wrong.
|
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 😉 |
Sorry, something went wrong.
|
Lol good point! |
Sorry, something went wrong.
|
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: { test: /\.css$/, loader: 'style!css?sourceMap!postcss' }, And I can't complain about FOUC (flash of unstyled content) - so all good for development! Hope tat may help someone here! 😎 |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Hi, Any update about css / sass sourcemaps in development mode (npm start) ? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #590.
@gaearon this is a simple solution - and thanks to the comments in this file I don't think I'm missing anything? :)