Skip to content

Commit 39bc7ec

Browse files
committedMar 26, 2025··
chore: add alias for safe-buffer to node:buffer
1 parent 36cf5f2 commit 39bc7ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/module.ts

+5
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ export default defineNuxtModule<ModuleOptions>({
204204
if (!nuxt.options.nitro.unenv.external.includes('node:process')) {
205205
nuxt.options.nitro.unenv.external.push('node:process')
206206
}
207+
// Add safe-buffer as alias to node:buffer
208+
nuxt.options.nitro.unenv.alias ||= {}
209+
if (!nuxt.options.nitro.unenv.alias['safe-buffer']) {
210+
nuxt.options.nitro.unenv.alias['safe-buffer'] = 'node:buffer'
211+
}
207212

208213
// Add the env middleware
209214
nuxt.options.nitro.handlers ||= []

0 commit comments

Comments
 (0)
Please sign in to comment.