diff --git a/client/gatsby-ssr.js b/client/gatsby-ssr.js
index 041dda0934..86df37baea 100644
--- a/client/gatsby-ssr.js
+++ b/client/gatsby-ssr.js
@@ -32,3 +32,19 @@ export const onRenderBody = ({
setHeadComponents(getheadTagComponents());
setPostBodyComponents(getPostBodyComponents(pathname));
};
+
+export const onPreRenderHTML = ({
+ getHeadComponents,
+ replaceHeadComponents
+}) => {
+ const headComponents = getHeadComponents();
+ headComponents.sort((x, y) => {
+ if (x.key === 'bootstrap-min-preload' || x.key === 'bootstrap-min') {
+ return -1;
+ } else if (y.key === 'bootstrap-min-preload' || y.key === 'bootstrap-min') {
+ return 1;
+ }
+ return 0;
+ });
+ replaceHeadComponents(headComponents);
+};
diff --git a/client/utils/tags.js b/client/utils/tags.js
index d502b11cad..548705521c 100644
--- a/client/utils/tags.js
+++ b/client/utils/tags.js
@@ -10,10 +10,10 @@ export const getheadTagComponents = () => {
,
- ,
+ ,
,