Skip to content

Commit ef605fd

Browse files
committed
perf(utils): dynamically import clipboardy
1 parent 899c5d4 commit ef605fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/utils/text.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import clipboard from 'clipboardy'
2-
3-
export const copyText = async (text: string) => await clipboard.write(text)
1+
export const copyText = async (text: string) => {
2+
const clipboard = (await import('clipboardy')).default
3+
await clipboard.write(text)
4+
}
45

56
export const calculatePasswordStrength = (password: string) => {
67
if (!password) return 0

0 commit comments

Comments
 (0)