Skip to content

Commit 3f2aabe

Browse files
committed
fix: add back cloudflare: as externals
1 parent 0314365 commit 3f2aabe

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/module.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ export default defineNuxtModule<ModuleOptions>({
146146
// Fix cloudflare:* externals in rollup
147147
nuxt.options.nitro.rollupConfig = nuxt.options.nitro.rollupConfig || {}
148148
nuxt.options.nitro.rollupConfig.plugins = ([] as any[]).concat(nuxt.options.nitro.rollupConfig.plugins || [])
149-
// nuxt.options.nitro.rollupConfig.plugins.push({
150-
// name: 'nuxthub-rollup-plugin',
151-
// resolveId(id: string) {
152-
// if (id.startsWith('cloudflare:')) {
153-
// return { id, external: true }
154-
// }
155-
// return null
156-
// }
157-
// })
149+
nuxt.options.nitro.rollupConfig.plugins.push({
150+
name: 'nuxthub-rollup-plugin',
151+
resolveId(id: string) {
152+
if (id.startsWith('cloudflare:')) {
153+
return { id, external: true }
154+
}
155+
return null
156+
}
157+
})
158158
// Enable Async Local Storage
159159
nuxt.options.nitro.experimental = nuxt.options.nitro.experimental || {}
160160
nuxt.options.nitro.experimental.asyncContext = true

0 commit comments

Comments
 (0)