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
feature(gatsby): Extract non-css-in-js css and add add to <head> when SSRing in dev (#28471)
* feature(gatsby): Pause dev-ssr watching between page loads to avoid slowing down regular develop-js HMR
* update snapshot
* Don't double-resolve + add activity for building the SSR bundle
* Add timeout for tests to ensure that dev server has time to bundle SSR + remove activity timers as not helpful
* feature(gatsby): Extract and add CSS when SSRing in dev
* Remove commented out code
* get tests passing
* WIP
* Got hot-reloading working w/ mini-css-extract-plugin
* remove mistakenly added file
* remove change to yarn.lock
* revert other mistakenly added files
* Add an async module to test against
* fix async module
* Add postcss/tailwind
* write webpack config for easy comparisons
* that was a lot easier than I thought — just set hmr:true for non-production sites
* cleanups
* Don't need this since we're using <link> not <style>
* pass in port
* remove dev css from test comparisons
* Update snapshots + add tailwind
* cleanups
* remove discarded changes
* Move changes behind flag
* Undo unnecesary changes
* Update tests for signature change
* Move more code behind the flag
* dynamically set absolute URL for css files so works wherever it's hosted
* start relative than make absolute
* Remove now unused port
* Remove changes from #28394
* use @pieh's suggested refactor in https://github.com/gatsbyjs/gatsby/pull/28471/files\#r546803732
* pass naming options for extractText in via options
* Update packages/gatsby/src/utils/webpack.config.js
Co-authored-by: Michal Piechowiak <[email protected]>
* Update snapshot
* Stop Jest from chocking on import of css
* turned out we didn't need this
* test(ssr): ignore src/test file (those are not tests)
* test(ssr): update snapshot after removing inline script modyfing href
Co-authored-by: Michal Piechowiak <[email protected]>
Copy file name to clipboardExpand all lines: integration-tests/ssr/__tests__/__snapshots__/ssr.js.snap
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
-
exports[`SSR is run for a page when it is requested 1`] =`"<!DOCTYPE html><html><head><metacharSet=\\"utf-8\\"/><metahttp-equiv=\\"x-ua-compatible\\"content=\\"ie=edge\\"/><metaname=\\"viewport\\"content=\\"width=device-width,initial-scale=1,shrink-to-fit=no\\"/><metaname=\\"note\\"content=\\"environment=development\\"/><scriptsrc=\\"/socket.io/socket.io.js\\"></script></head><body><divid=\\"___gatsby\\"><divstyle=\\"outline:none\\"tabindex=\\"-1\\"id=\\"gatsby-focus-wrapper\\"><div>Helloworld</div></div><divid=\\"gatsby-announcer\\"style=\\"position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0\\"aria-live=\\"assertive\\"aria-atomic=\\"true\\"></div></div><scriptsrc=\\"/polyfill.js\\"nomodule=\\"\\"></script><scriptsrc=\\"/commons.js\\"></script></body></html>"`;
3
+
exports[`SSR is run for a page when it is requested 1`] =`"<!DOCTYPE html><html><head><metacharSet=\\"utf-8\\"/><metahttp-equiv=\\"x-ua-compatible\\"content=\\"ie=edge\\"/><metaname=\\"viewport\\"content=\\"width=device-width,initial-scale=1,shrink-to-fit=no\\"/><linkdata-identity=\\"gatsby-dev-css\\"rel=\\"stylesheet\\"type=\\"text/css\\"href=\\"/commons.css\\"/><metaname=\\"note\\"content=\\"environment=development\\"/><scriptsrc=\\"/socket.io/socket.io.js\\"></script></head><body><divid=\\"___gatsby\\"><divstyle=\\"outline:none\\"tabindex=\\"-1\\"id=\\"gatsby-focus-wrapper\\"><div><h1class=\\"hi\\">Helloworld</h1></div></div><divid=\\"gatsby-announcer\\"style=\\"position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0\\"aria-live=\\"assertive\\"aria-atomic=\\"true\\"></div></div><scriptsrc=\\"/polyfill.js\\"nomodule=\\"\\"></script><scriptsrc=\\"/commons.js\\"></script></body></html>"`;
0 commit comments