Skip to content

Commit

Permalink
fix: add back cloudflare: as externals
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Feb 7, 2025
1 parent 0314365 commit 3f2aabe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ export default defineNuxtModule<ModuleOptions>({
// Fix cloudflare:* externals in rollup
nuxt.options.nitro.rollupConfig = nuxt.options.nitro.rollupConfig || {}
nuxt.options.nitro.rollupConfig.plugins = ([] as any[]).concat(nuxt.options.nitro.rollupConfig.plugins || [])
// nuxt.options.nitro.rollupConfig.plugins.push({
// name: 'nuxthub-rollup-plugin',
// resolveId(id: string) {
// if (id.startsWith('cloudflare:')) {
// return { id, external: true }
// }
// return null
// }
// })
nuxt.options.nitro.rollupConfig.plugins.push({
name: 'nuxthub-rollup-plugin',
resolveId(id: string) {
if (id.startsWith('cloudflare:')) {
return { id, external: true }
}
return null
}
})
// Enable Async Local Storage
nuxt.options.nitro.experimental = nuxt.options.nitro.experimental || {}
nuxt.options.nitro.experimental.asyncContext = true
Expand Down

0 comments on commit 3f2aabe

Please sign in to comment.