Skip to content
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

Properly set the pathPrefix and assetPrefix in the pluginData (#33667) #33702

Merged
merged 1 commit into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`build-headers-program with an assetPrefix 1`] = `"{\\"/*\\":[\\"X-Frame-Options: DENY\\",\\"X-XSS-Protection: 1; mode=block\\",\\"X-Content-Type-Options: nosniff\\",\\"Referrer-Policy: same-origin\\"],\\"/component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/0-0180cd94ef2497ac7db8.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-templates-blog-post-js-517987eae96e75cddbe7.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-404-js-53e6c51a5a7e73090f50.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-index-js-0bdd01c77ee09ef0224c.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/webpack-runtime-acaa8994f1f704475e21.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles.1025963f4f2ec7abbad4.css\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles-565f081c8374bbda155f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/app-f33c13590352da20930f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/static/*\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/sw.js\\":[\\"Cache-Control: public, max-age=0, must-revalidate\\"],\\"/offline-plugin-app-shell-fallback/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/offline-plugin-app-shell-fallback/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hi-folks/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/hi-folks/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/my-second-post/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/my-second-post/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hello-world/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/hello-world/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/404/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/test/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-index-js-0bdd01c77ee09ef0224c.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/index/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404.html\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/404.html/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"]}"`;

exports[`build-headers-program with caching headers 1`] = `"{\\"/*\\":[\\"X-Frame-Options: DENY\\",\\"X-XSS-Protection: 1; mode=block\\",\\"X-Content-Type-Options: nosniff\\",\\"Referrer-Policy: same-origin\\"],\\"/component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/0-0180cd94ef2497ac7db8.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-templates-blog-post-js-517987eae96e75cddbe7.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-404-js-53e6c51a5a7e73090f50.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-index-js-0bdd01c77ee09ef0224c.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/webpack-runtime-acaa8994f1f704475e21.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles.1025963f4f2ec7abbad4.css\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles-565f081c8374bbda155f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/app-f33c13590352da20930f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/static/*\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/sw.js\\":[\\"Cache-Control: public, max-age=0, must-revalidate\\"],\\"/offline-plugin-app-shell-fallback/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/offline-plugin-app-shell-fallback/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hi-folks/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/hi-folks/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/my-second-post/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/my-second-post/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hello-world/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/hello-world/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/404/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/test/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-index-js-0bdd01c77ee09ef0224c.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/index/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404.html\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/app-data.json>; rel=preload; as=fetch; crossorigin; nopush\\",\\"Link: </page-data/404.html/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"]}"`;

exports[`build-headers-program with manifest['pages-manifest'] 1`] = `"{\\"/*\\":[\\"X-Frame-Options: DENY\\",\\"X-XSS-Protection: 1; mode=block\\",\\"X-Content-Type-Options: nosniff\\",\\"Referrer-Policy: same-origin\\"],\\"/component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/0-0180cd94ef2497ac7db8.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-templates-blog-post-js-517987eae96e75cddbe7.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-404-js-53e6c51a5a7e73090f50.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/component---src-pages-index-js-0bdd01c77ee09ef0224c.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/pages-manifest-ab11f09e0ca7ecd3b43e.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/webpack-runtime-acaa8994f1f704475e21.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles.1025963f4f2ec7abbad4.css\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/styles-565f081c8374bbda155f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/app-f33c13590352da20930f.js\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/static/*\\":[\\"Cache-Control: public, max-age=31536000, immutable\\"],\\"/sw.js\\":[\\"Cache-Control: public, max-age=0, must-revalidate\\"],\\"/offline-plugin-app-shell-fallback/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </component---node-modules-gatsby-plugin-offline-app-shell-js-78f9e4dea04737fa062d.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/offline-plugin-app-shell-fallback/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hi-folks/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/hi-folks/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/my-second-post/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/my-second-post/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/hello-world/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-templates-blog-post-js-517987eae96e75cddbe7.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/hello-world/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/404/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/test/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\"],\\"/\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-index-js-0bdd01c77ee09ef0224c.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/index/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"],\\"/404.html\\":[\\"Link: </webpack-runtime-acaa8994f1f704475e21.js>; rel=preload; as=script; nopush\\",\\"Link: </styles-565f081c8374bbda155f.js>; rel=preload; as=script; nopush\\",\\"Link: </app-f33c13590352da20930f.js>; rel=preload; as=script; nopush\\",\\"Link: </0-0180cd94ef2497ac7db8.js>; rel=preload; as=script; nopush\\",\\"Link: </component---src-pages-404-js-53e6c51a5a7e73090f50.js>; rel=preload; as=script; nopush\\",\\"Link: </page-data/404.html/page-data.json>; rel=preload; as=fetch; crossorigin; nopush\\"]}"`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe(`build-headers-program`, () => {

const createPluginData = async () => {
const tmpDir = await fs.mkdtemp(
path.join(os.tmpdir(), `abhi-plugin-fastly-`)
path.join(os.tmpdir(), `gatsby-plugin-gatsby-cloud-`)
)

return {
Expand Down Expand Up @@ -198,6 +198,7 @@ describe(`build-headers-program`, () => {
],
},
pathPrefix: ``,
assetPrefix: ``,
publicFolder: (...files) => path.join(tmpDir, ...files),
}
}
Expand Down Expand Up @@ -349,4 +350,24 @@ describe(`build-headers-program`, () => {
expect.any(Function)
)
})

it(`with an assetPrefix`, async () => {
let pluginData = await createPluginData()
pluginData = {
...pluginData,
assetPrefix: `http://cloud.gatsbyjs.io`,
}

const pluginOptions = {
...DEFAULT_OPTIONS,
}

await buildHeadersProgram(pluginData, pluginOptions)

const output = await fs.readFile(
pluginData.publicFolder(HEADERS_FILENAME),
`utf8`
)
expect(output).toMatchSnapshot()
})
})
5 changes: 4 additions & 1 deletion packages/gatsby-plugin-gatsby-cloud/src/__tests__/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ describe(`Routes IPC`, () => {

onPostBuild(
{
pathPrefix: ``,
store: {
getState() {
return {
Expand Down Expand Up @@ -56,6 +55,10 @@ describe(`Routes IPC`, () => {
},
],
]),
config: {
assetPath: ``,
pathPrefix: ``,
},
}
},
},
Expand Down
9 changes: 3 additions & 6 deletions packages/gatsby-plugin-gatsby-cloud/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ exports.onCreateWebpackConfig = ({ actions, stage }) => {
})
}

exports.onPostBuild = async (
{ store, pathPrefix, getNodesByType },
userPluginOptions
) => {
const pluginData = makePluginData(store, assetsManifest, pathPrefix)

exports.onPostBuild = async ({ store, getNodesByType }, userPluginOptions) => {
const pluginOptions = { ...DEFAULT_OPTIONS, ...userPluginOptions }

const { redirects, pageDataStats, nodes, pages } = store.getState()

const pluginData = makePluginData(store, assetsManifest)

/**
* Emit via IPC routes for which pages are non SSG
*/
Expand Down
Loading