Skip to content

Commit

Permalink
fix(ipx): set prerenderer config as well (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 29, 2023
1 parent 357efad commit 0aa03b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ipx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export const ipxSetup: ProviderSetup = async (providerOptions, moduleOptions) =>
const resolver = createResolver(import.meta.url)
nuxt.hook('nitro:init', (nitro) => {
ipxOptions.dir = relative(nitro.options.output.serverDir, nitro.options.output.publicDir)
nitro.options.runtimeConfig.ipx = ipxOptions
// TODO: Workaround for prerender support
// https://github.com/nuxt/image/pull/784
nitro.options._config.runtimeConfig = nitro.options._config.runtimeConfig || {}
nitro.options._config.runtimeConfig.ipx = nitro.options.runtimeConfig.ipx = ipxOptions
})
nuxt.options.serverHandlers.push({
route: '/_ipx/**',
Expand Down

0 comments on commit 0aa03b6

Please sign in to comment.