Skip to content

Commit

Permalink
fix: windows path resolution of provider
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Oct 3, 2023
1 parent 2eedbb6 commit 7ae4e82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,10 @@ export default function() {
`
}

const rendererPath = `${runtimeDir}/nitro/renderers`
nitroConfig.virtual!['#nuxt-og-image/provider'] = `
${config.runtimeSatori ? `import satori from '${relative(nuxt.options.rootDir, resolve('./runtime/nitro/renderers/satori'))}'` : ''}
${config.runtimeBrowser ? `import browser from '${relative(nuxt.options.rootDir, resolve('./runtime/nitro/renderers/browser'))}'` : ''}
${config.runtimeSatori ? `import satori from '${rendererPath}/satori'` : ''}
${config.runtimeBrowser ? `import browser from '${rendererPath}/browser'` : ''}
export async function useProvider(provider) {
if (provider === 'satori')
Expand Down

0 comments on commit 7ae4e82

Please sign in to comment.