Skip to content

Commit 89bf265

Browse files
committed
fix(project): gray-matter issue workaround
1 parent 3ebd665 commit 89bf265

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/fix-gray-matter.client.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Buffer } from 'buffer'
2+
import { defineNuxtPlugin } from '#imports'
3+
4+
// TODO: remove this fix when https://github.com/jonschlinkert/gray-matter/pull/132 is merged
5+
// `Buffer` is not globally available
6+
export default defineNuxtPlugin(() => {
7+
Object.assign(window, { Buffer })
8+
})

0 commit comments

Comments
 (0)