Skip to content

Commit

Permalink
[FE] feat : 폰트 preload 적용 (#605)
Browse files Browse the repository at this point in the history
* fix: BundleAnalyzerPlugin 실행 환경 오류 수정

- dev 모드가 아닌 prod 모드에서 실행하도록 수정

* feat: 구글 폰트 preload 적용

* feat: pretendard virable font로 변경 및 preload 적용

* fix : pretendard css 불러오는 link 수정

- 변경 사유 :rel이 preload인 link, stylesheet인 link가 두 개 같이 존재해서 헷갈림
- 변경 방법 : onload="this.onload=null;this.rel='stylesheet'" 사용

* fix: useStepList 테스트 오류 수정

* chore: BundleAnalyzerPlugin 주석 처리
  • Loading branch information
BadaHertz52 authored Sep 12, 2024
1 parent 8cdf8eb commit d134c0b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!--font-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"
rel="stylesheet" />
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin="anonymous">

<link rel="preload" href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap"
as="style" />
<link rel="preload" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.8/dist/web/variable/pretendardvariable-dynamic-subset.css" onload="this.onload=null;this.rel='stylesheet'" />
<title>REVIEW ME</title>
</head>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ describe('프로그레스 바 테스트', () => {

return newMap;
});
});

//두번째 카드 이동 불가
expect(result.current.stepList[1].isMovingAvailable).toBeFalsy();
//두번째 카드 이동 불가
expect(result.current.stepList[1].isMovingAvailable).toBeFalsy();
});
});
});
});
2 changes: 1 addition & 1 deletion frontend/src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const globalStyles = css`
}
body {
font-family: 'Pretendard', 'Noto Sans', sans-serif;
font-family: 'Pretendard Variable', 'Noto Sans', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
Expand Down
4 changes: 2 additions & 2 deletions frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
const Dotenv = require('dotenv-webpack');
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');

const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;

module.exports = (env, argv) => {
const isProduction = argv.mode === 'production';
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = (env, argv) => {
favicon: './src/favicons/favicon.ico',
}),
new CleanWebpackPlugin(),
!isProduction && new BundleAnalyzerPlugin(),
// new BundleAnalyzerPlugin(),
new Dotenv({
systemvars: true,
path: './.env',
Expand Down

0 comments on commit d134c0b

Please sign in to comment.