From 943584df6726ac15270687dda655f913538c36d5 Mon Sep 17 00:00:00 2001
From: Jaemin Choi <1dotolee@gmail.com>
Date: Thu, 23 May 2024 22:59:44 -0700
Subject: [PATCH] perf(fe): use dynamic subset of pretendard (#1706)
---
apps/frontend/app/layout.tsx | 12 +--
apps/frontend/package.json | 1 +
apps/frontend/tailwind.config.ts | 2 +-
pnpm-lock.yaml | 122 +++++++++++++++++++++++++++++--
4 files changed, 121 insertions(+), 16 deletions(-)
diff --git a/apps/frontend/app/layout.tsx b/apps/frontend/app/layout.tsx
index 4a74f7338a..1cc5ad9e1a 100644
--- a/apps/frontend/app/layout.tsx
+++ b/apps/frontend/app/layout.tsx
@@ -1,21 +1,13 @@
import { Toaster } from '@/components/ui/sonner'
import { metaBaseUrl } from '@/lib/constants'
-import { cn } from '@/lib/utils'
import type { Metadata, Viewport } from 'next'
import { Ubuntu_Mono } from 'next/font/google'
-import localFont from 'next/font/local'
+import 'pretendard/dist/web/variable/pretendardvariable-dynamic-subset.css'
import './globals.css'
// TODO: 추후에 페이지 별로 revalidate 시간 논의 및 조정 필요
export const revalidate = 5
-const pretendard = localFont({
- src: './PretendardVariable.woff2',
- display: 'swap',
- weight: '45 920',
- variable: '--font-pretendard'
-})
-
const mono = Ubuntu_Mono({
subsets: ['latin'],
weight: ['400'],
@@ -42,7 +34,7 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
-
+
{children}
= 0.8.0'}
+ pretendard@1.3.9:
+ resolution: {integrity: sha512-PaQAADyLY5v4kYFwkpSJHbSSYIkiriY/1xXw75TKoZ9UQQqeU+tvP05yTdZAWibiIYoo8ZKtRv8PM7w0IaywSw==}
+
prettier-linter-helpers@1.0.0:
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
engines: {node: '>=6.0.0'}
@@ -8912,6 +8918,7 @@ packages:
sinon@17.0.2:
resolution: {integrity: sha512-uihLiaB9FhzesElPDFZA7hDcNABzsVHwr3YfmM9sBllVwab3l0ltGlRV1XhpNfIacNDLGD1QRZNLs5nU5+hTuA==}
+ deprecated: There
sirv@2.0.4:
resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
@@ -10261,7 +10268,7 @@ snapshots:
'@aws-crypto/sha1-browser': 3.0.0
'@aws-crypto/sha256-browser': 3.0.0
'@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sso-oidc': 3.572.0(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/client-sso-oidc': 3.572.0
'@aws-sdk/client-sts': 3.572.0
'@aws-sdk/core': 3.572.0
'@aws-sdk/credential-provider-node': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0)(@aws-sdk/client-sts@3.572.0)
@@ -10323,7 +10330,7 @@ snapshots:
dependencies:
'@aws-crypto/sha256-browser': 3.0.0
'@aws-crypto/sha256-js': 3.0.0
- '@aws-sdk/client-sso-oidc': 3.572.0(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/client-sso-oidc': 3.572.0
'@aws-sdk/client-sts': 3.572.0
'@aws-sdk/core': 3.572.0
'@aws-sdk/credential-provider-node': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0)(@aws-sdk/client-sts@3.572.0)
@@ -10366,7 +10373,7 @@ snapshots:
transitivePeerDependencies:
- aws-crt
- '@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0)':
+ '@aws-sdk/client-sso-oidc@3.572.0':
dependencies:
'@aws-crypto/sha256-browser': 3.0.0
'@aws-crypto/sha256-js': 3.0.0
@@ -10408,6 +10415,51 @@ snapshots:
'@smithy/util-retry': 2.2.0
'@smithy/util-utf8': 2.3.0
tslib: 2.6.2
+ transitivePeerDependencies:
+ - aws-crt
+
+ '@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0)':
+ dependencies:
+ '@aws-crypto/sha256-browser': 3.0.0
+ '@aws-crypto/sha256-js': 3.0.0
+ '@aws-sdk/client-sts': 3.572.0
+ '@aws-sdk/core': 3.572.0
+ '@aws-sdk/credential-provider-node': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/middleware-host-header': 3.567.0
+ '@aws-sdk/middleware-logger': 3.568.0
+ '@aws-sdk/middleware-recursion-detection': 3.567.0
+ '@aws-sdk/middleware-user-agent': 3.572.0
+ '@aws-sdk/region-config-resolver': 3.572.0
+ '@aws-sdk/types': 3.567.0
+ '@aws-sdk/util-endpoints': 3.572.0
+ '@aws-sdk/util-user-agent-browser': 3.567.0
+ '@aws-sdk/util-user-agent-node': 3.568.0
+ '@smithy/config-resolver': 2.2.0
+ '@smithy/core': 1.4.2
+ '@smithy/fetch-http-handler': 2.5.0
+ '@smithy/hash-node': 2.2.0
+ '@smithy/invalid-dependency': 2.2.0
+ '@smithy/middleware-content-length': 2.2.0
+ '@smithy/middleware-endpoint': 2.5.1
+ '@smithy/middleware-retry': 2.3.1
+ '@smithy/middleware-serde': 2.3.0
+ '@smithy/middleware-stack': 2.2.0
+ '@smithy/node-config-provider': 2.3.0
+ '@smithy/node-http-handler': 2.5.0
+ '@smithy/protocol-http': 3.3.0
+ '@smithy/smithy-client': 2.5.1
+ '@smithy/types': 2.12.0
+ '@smithy/url-parser': 2.2.0
+ '@smithy/util-base64': 2.3.0
+ '@smithy/util-body-length-browser': 2.2.0
+ '@smithy/util-body-length-node': 2.3.0
+ '@smithy/util-defaults-mode-browser': 2.2.1
+ '@smithy/util-defaults-mode-node': 2.3.1
+ '@smithy/util-endpoints': 1.2.0
+ '@smithy/util-middleware': 2.2.0
+ '@smithy/util-retry': 2.2.0
+ '@smithy/util-utf8': 2.3.0
+ tslib: 2.6.2
transitivePeerDependencies:
- '@aws-sdk/client-sts'
- aws-crt
@@ -10461,7 +10513,7 @@ snapshots:
'@aws-crypto/sha256-js': 3.0.0
'@aws-sdk/client-sso-oidc': 3.572.0(@aws-sdk/client-sts@3.572.0)
'@aws-sdk/core': 3.572.0
- '@aws-sdk/credential-provider-node': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0)(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/credential-provider-node': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))(@aws-sdk/client-sts@3.572.0)
'@aws-sdk/middleware-host-header': 3.567.0
'@aws-sdk/middleware-logger': 3.568.0
'@aws-sdk/middleware-recursion-detection': 3.567.0
@@ -10529,6 +10581,23 @@ snapshots:
'@smithy/util-stream': 2.2.0
tslib: 2.6.2
+ '@aws-sdk/credential-provider-ini@3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))(@aws-sdk/client-sts@3.572.0)':
+ dependencies:
+ '@aws-sdk/client-sts': 3.572.0
+ '@aws-sdk/credential-provider-env': 3.568.0
+ '@aws-sdk/credential-provider-process': 3.572.0
+ '@aws-sdk/credential-provider-sso': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))
+ '@aws-sdk/credential-provider-web-identity': 3.568.0(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/types': 3.567.0
+ '@smithy/credential-provider-imds': 2.3.0
+ '@smithy/property-provider': 2.2.0
+ '@smithy/shared-ini-file-loader': 2.4.0
+ '@smithy/types': 2.12.0
+ tslib: 2.6.2
+ transitivePeerDependencies:
+ - '@aws-sdk/client-sso-oidc'
+ - aws-crt
+
'@aws-sdk/credential-provider-ini@3.572.0(@aws-sdk/client-sso-oidc@3.572.0)(@aws-sdk/client-sts@3.572.0)':
dependencies:
'@aws-sdk/client-sts': 3.572.0
@@ -10546,6 +10615,25 @@ snapshots:
- '@aws-sdk/client-sso-oidc'
- aws-crt
+ '@aws-sdk/credential-provider-node@3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))(@aws-sdk/client-sts@3.572.0)':
+ dependencies:
+ '@aws-sdk/credential-provider-env': 3.568.0
+ '@aws-sdk/credential-provider-http': 3.568.0
+ '@aws-sdk/credential-provider-ini': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/credential-provider-process': 3.572.0
+ '@aws-sdk/credential-provider-sso': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))
+ '@aws-sdk/credential-provider-web-identity': 3.568.0(@aws-sdk/client-sts@3.572.0)
+ '@aws-sdk/types': 3.567.0
+ '@smithy/credential-provider-imds': 2.3.0
+ '@smithy/property-provider': 2.2.0
+ '@smithy/shared-ini-file-loader': 2.4.0
+ '@smithy/types': 2.12.0
+ tslib: 2.6.2
+ transitivePeerDependencies:
+ - '@aws-sdk/client-sso-oidc'
+ - '@aws-sdk/client-sts'
+ - aws-crt
+
'@aws-sdk/credential-provider-node@3.572.0(@aws-sdk/client-sso-oidc@3.572.0)(@aws-sdk/client-sts@3.572.0)':
dependencies:
'@aws-sdk/credential-provider-env': 3.568.0
@@ -10573,6 +10661,19 @@ snapshots:
'@smithy/types': 2.12.0
tslib: 2.6.2
+ '@aws-sdk/credential-provider-sso@3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))':
+ dependencies:
+ '@aws-sdk/client-sso': 3.572.0
+ '@aws-sdk/token-providers': 3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))
+ '@aws-sdk/types': 3.567.0
+ '@smithy/property-provider': 2.2.0
+ '@smithy/shared-ini-file-loader': 2.4.0
+ '@smithy/types': 2.12.0
+ tslib: 2.6.2
+ transitivePeerDependencies:
+ - '@aws-sdk/client-sso-oidc'
+ - aws-crt
+
'@aws-sdk/credential-provider-sso@3.572.0(@aws-sdk/client-sso-oidc@3.572.0)':
dependencies:
'@aws-sdk/client-sso': 3.572.0
@@ -10702,7 +10803,7 @@ snapshots:
'@smithy/types': 2.12.0
tslib: 2.6.2
- '@aws-sdk/token-providers@3.572.0(@aws-sdk/client-sso-oidc@3.572.0)':
+ '@aws-sdk/token-providers@3.572.0(@aws-sdk/client-sso-oidc@3.572.0(@aws-sdk/client-sts@3.572.0))':
dependencies:
'@aws-sdk/client-sso-oidc': 3.572.0(@aws-sdk/client-sts@3.572.0)
'@aws-sdk/types': 3.567.0
@@ -10711,6 +10812,15 @@ snapshots:
'@smithy/types': 2.12.0
tslib: 2.6.2
+ '@aws-sdk/token-providers@3.572.0(@aws-sdk/client-sso-oidc@3.572.0)':
+ dependencies:
+ '@aws-sdk/client-sso-oidc': 3.572.0
+ '@aws-sdk/types': 3.567.0
+ '@smithy/property-provider': 2.2.0
+ '@smithy/shared-ini-file-loader': 2.4.0
+ '@smithy/types': 2.12.0
+ tslib: 2.6.2
+
'@aws-sdk/types@3.567.0':
dependencies:
'@smithy/types': 2.12.0
@@ -19657,6 +19767,8 @@ snapshots:
prelude-ls@1.2.1: {}
+ pretendard@1.3.9: {}
+
prettier-linter-helpers@1.0.0:
dependencies:
fast-diff: 1.3.0