Skip to content

Commit 1f93481

Browse files
committed
chore: optimize bundle size
1 parent 70e95ad commit 1f93481

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/hub/src/node/utils.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import type { ClientScriptEntry } from '../types/docks'
2-
import { toDataURL } from 'mlly'
2+
import { Buffer } from 'node:buffer'
3+
4+
function toDataURL(code: string) {
5+
return `data:text/javascript;base64,${Buffer.from(code).toString('base64')}`
6+
}
37

48
/**
59
* Create a quick `ClientScriptEntry` from an inline function or

0 commit comments

Comments
 (0)