File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
packages/gatsby/cache-dir Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -137,19 +137,6 @@ module.exports = (locals, callback) => {
137137 bodyHtml,
138138 } )
139139
140- // Add the chunk-manifest as a head component.
141- const chunkManifest = require ( `!raw!../public/chunk-manifest.json` )
142-
143- headComponents . unshift (
144- < script
145- id = "webpack-manifest"
146- key = "webpack-manifest"
147- dangerouslySetInnerHTML = { {
148- __html : `/*<![CDATA[*/window.webpackManifest=${ chunkManifest } /*]]>*/` ,
149- } }
150- />
151- )
152-
153140 let stats
154141 try {
155142 stats = require ( `../public/stats.json` )
@@ -208,6 +195,19 @@ module.exports = (locals, callback) => {
208195 />
209196 )
210197
198+ // Add the chunk-manifest at the end of body element.
199+ const chunkManifest = require ( `!raw!../public/chunk-manifest.json` )
200+
201+ postBodyComponents . unshift (
202+ < script
203+ id = "webpack-manifest"
204+ key = "webpack-manifest"
205+ dangerouslySetInnerHTML = { {
206+ __html : `/*<![CDATA[*/window.webpackManifest=${ chunkManifest } /*]]>*/` ,
207+ } }
208+ />
209+ )
210+
211211 const html = `<!DOCTYPE html>${ renderToStaticMarkup (
212212 < Html
213213 { ...bodyProps }
You can’t perform that action at this time.
0 commit comments