Skip to content

Commit 64e0e3e

Browse files
committed
version: notion-utils v0.4.8
1 parent 9c5f47b commit 64e0e3e

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

packages/notion-to-utils/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# notion-to-utils
22

3+
## 0.4.8
4+
5+
### Patch Changes
6+
7+
- Dynamic import 추가
8+
39
## 0.4.7
410

511
### Patch Changes

packages/notion-to-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "notion-to-utils",
3-
"version": "0.4.7",
3+
"version": "0.4.8",
44
"description": "",
55
"repository": {
66
"type": "git",

packages/notion-to-utils/src/utils/makePreviewImage.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import lqip from 'lqip-modern';
2-
31
export interface PreviewImage {
42
originalWidth: number;
53
originalHeight: number;
@@ -24,9 +22,13 @@ export const makePreviewImage = async (url: string) => {
2422
const response = await fetch(url);
2523
const buffer = Buffer.from(await response.arrayBuffer());
2624

25+
// 동적 import 사용
26+
const lqip = (await import('lqip-modern')).default;
27+
2728
const {
2829
metadata: { dataURIBase64, originalHeight, originalWidth },
2930
} = await lqip(buffer);
31+
3032
const result: PreviewImage = {
3133
dataURIBase64,
3234
originalHeight,

0 commit comments

Comments
 (0)