From bb1fa7fe152421644b7eaf558bf4aa9adb7ff075 Mon Sep 17 00:00:00 2001 From: dongree Date: Sat, 30 Mar 2024 00:18:33 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20react-icons=20->=20@react-icons/all-file?= =?UTF-8?q?s=20=EB=B3=80=EA=B2=BD=20:=20=EB=B2=88=EB=93=A4=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=A6=88=20=EA=B0=90=EC=B6=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 10 +- package-lock.json | 166 ++++++++++++++++-- package.json | 3 +- .../covoerletter/CoverLetterContainer.tsx | 2 +- .../create/coverletter/CoverLetterForm.tsx | 2 +- src/components/create/series/MemoDndCard.tsx | 6 +- src/components/create/series/SelectCard.tsx | 11 +- src/components/me/CoverLetterOpenToggle.tsx | 6 +- src/components/me/ScoreDetailModal.tsx | 10 +- src/components/question/QuestionCard.tsx | 4 +- src/components/ranking/RankingCard.tsx | 2 +- src/components/shared/header/SubMenu1.tsx | 4 +- src/components/shared/header/SubMenu2.tsx | 4 +- 13 files changed, 191 insertions(+), 39 deletions(-) diff --git a/next.config.js b/next.config.js index df014798..94e368f8 100644 --- a/next.config.js +++ b/next.config.js @@ -1,9 +1,13 @@ -/** @type {import('next').NextConfig} */ - const withPWA = require('next-pwa')({ dest: 'public', }); +const withBundleAnalyzer = require('@next/bundle-analyzer')({ + enabled: process.env.ANALYZE === 'true', +}); + +/** @type {import('next').NextConfig} */ + const nextConfig = { output: 'standalone', images: { @@ -55,3 +59,5 @@ module.exports = withSentryConfig( disableLogger: true, } ); + +module.exports = withBundleAnalyzer(nextConfig); diff --git a/package-lock.json b/package-lock.json index 8e8a62cd..fe5ac521 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,9 @@ "name": "inforum", "version": "1.0.0", "dependencies": { + "@next/bundle-analyzer": "^14.1.4", "@ramonak/react-progress-bar": "^5.0.3", + "@react-icons/all-files": "^4.1.0", "@sentry/nextjs": "^7.61.0", "@tailwindcss/typography": "^0.5.9", "@tiptap/core": "^2.0.3", @@ -57,7 +59,6 @@ "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dom": "18.2.0", - "react-icons": "^4.10.1", "react-markdown": "^9.0.0", "react-moveable": "^0.54.1", "react-spinners": "^0.13.8", @@ -1944,6 +1945,14 @@ "resolved": "https://registry.npmjs.org/@daybrush/utils/-/utils-1.13.0.tgz", "integrity": "sha512-ALK12C6SQNNHw1enXK+UO8bdyQ+jaWNQ1Af7Z3FNxeAwjYhQT7do+TRE4RASAJ3ObaS2+TJ7TXR3oz2Gzbw0PQ==" }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@egjs/agent": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/@egjs/agent/-/agent-2.4.3.tgz", @@ -2632,6 +2641,14 @@ "node": "^12.16.0 || >=13.7.0" } }, + "node_modules/@next/bundle-analyzer": { + "version": "14.1.4", + "resolved": "https://registry.npmjs.org/@next/bundle-analyzer/-/bundle-analyzer-14.1.4.tgz", + "integrity": "sha512-IpF/18HcAOcfHRr24tqPOUpMmVKIqvkCxIubMeRYWCXs3jm7niPGrt8Mu74yMDzfGlUwgQA6Xd6BUc5+jQxcEg==", + "dependencies": { + "webpack-bundle-analyzer": "4.10.1" + } + }, "node_modules/@next/env": { "version": "13.4.13", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.13.tgz", @@ -2831,6 +2848,11 @@ "url": "https://opencollective.com/unts" } }, + "node_modules/@polka/url": { + "version": "1.0.0-next.25", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", + "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==" + }, "node_modules/@popperjs/core": { "version": "2.11.8", "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", @@ -2864,6 +2886,14 @@ "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-4.0.2.tgz", "integrity": "sha512-/RVXdLvJxLg4QKvMoM5WlwNR9ViO9z8B/qPcc+C0Sa/teJY7QG7kJ441DwzOjMYEY7GmU4dj5EcGHIkKZiQZCA==" }, + "node_modules/@react-icons/all-files": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@react-icons/all-files/-/all-files-4.1.0.tgz", + "integrity": "sha512-hxBI2UOuVaI3O/BhQfhtb4kcGn9ft12RWAFVMUeNjqqhLsHvFtzIkFaptBJpFDANTKoDfdVoHTKZDlwKCACbMQ==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/@remirror/core-constants": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-2.0.1.tgz", @@ -6266,6 +6296,11 @@ "node": ">=12" } }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -6627,6 +6662,11 @@ "node": ">=12" } }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, "node_modules/ejs": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", @@ -7970,6 +8010,20 @@ "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.4.tgz", "integrity": "sha512-1ByAq8dD0W4aBZ/JArgaQvc0gyUfkGkP8mgAQa0qZGdpOKlSOhOf+WNXjoLimKaKG3Z4Iu6DKZtnyszqQeyqWQ==" }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -8127,8 +8181,7 @@ "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==" }, "node_modules/html-url-attributes": { "version": "3.0.0", @@ -11248,6 +11301,14 @@ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -11734,6 +11795,14 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.12.tgz", "integrity": "sha512-d6xjC9fJ/nSnfDeU0AMDsaJyb1iHsqCSOdi84w4u+SlN/UgQdY5tRhpMzaFYsI4mnpvgTivEaQd0yOUhAtOnEQ==" }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "bin": { + "opener": "bin/opener-bin.js" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -12678,14 +12747,6 @@ "react": "^18.2.0" } }, - "node_modules/react-icons": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.10.1.tgz", - "integrity": "sha512-/ngzDP/77tlCfqthiiGNZeYFACw85fUjZtLbedmJ5DTlNDIwETxhwBzdOJ21zj4iJdvc0J3y7yOsX3PpxAJzrw==", - "peerDependencies": { - "react": "*" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -13526,6 +13587,19 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -14398,6 +14472,14 @@ "node": ">=8.0" } }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "engines": { + "node": ">=6" + } + }, "node_modules/tough-cookie": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", @@ -15038,6 +15120,68 @@ } } }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.1.tgz", + "integrity": "sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==", + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "is-plain-object": "^5.0.0", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack-bundle-analyzer/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", diff --git a/package.json b/package.json index 45e47ed3..e3369bb4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "test:coverage": "npm test -- --coverage" }, "dependencies": { + "@next/bundle-analyzer": "^14.1.4", "@ramonak/react-progress-bar": "^5.0.3", + "@react-icons/all-files": "^4.1.0", "@sentry/nextjs": "^7.61.0", "@tailwindcss/typography": "^0.5.9", "@tiptap/core": "^2.0.3", @@ -60,7 +62,6 @@ "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dom": "18.2.0", - "react-icons": "^4.10.1", "react-markdown": "^9.0.0", "react-moveable": "^0.54.1", "react-spinners": "^0.13.8", diff --git a/src/components/covoerletter/CoverLetterContainer.tsx b/src/components/covoerletter/CoverLetterContainer.tsx index ca10b482..c3bd4f19 100644 --- a/src/components/covoerletter/CoverLetterContainer.tsx +++ b/src/components/covoerletter/CoverLetterContainer.tsx @@ -3,7 +3,7 @@ import { CoverletterInfo, StackInfo } from '@/types/coverletter'; import { useState } from 'react'; import BlueBtn from '../shared/btn/BlueBtn'; -import { AiOutlineInfoCircle } from 'react-icons/ai'; +import { AiOutlineInfoCircle } from '@react-icons/all-files/ai/AiOutlineInfoCircle'; import MyEditor from '@/lib/editor'; import { useEditor } from '@tiptap/react'; import { handleTiptapExtensions } from '@/lib/editor/extensions'; diff --git a/src/components/create/coverletter/CoverLetterForm.tsx b/src/components/create/coverletter/CoverLetterForm.tsx index e6e3ce99..f4cb45ae 100644 --- a/src/components/create/coverletter/CoverLetterForm.tsx +++ b/src/components/create/coverletter/CoverLetterForm.tsx @@ -3,7 +3,7 @@ import BlueBtn from '@/components/shared/btn/BlueBtn'; import { notifyToast } from '@/utils/notify'; import { ChangeEvent, useContext, useEffect, useState } from 'react'; -import { AiOutlineInfoCircle } from 'react-icons/ai'; +import { AiOutlineInfoCircle } from '@react-icons/all-files/ai/AiOutlineInfoCircle'; import CoverLetterPage2 from './CoverLetterPage2'; import { DevelopmentArea, StackInfo } from '@/types/coverletter'; import { diff --git a/src/components/create/series/MemoDndCard.tsx b/src/components/create/series/MemoDndCard.tsx index 46c6581f..59b10466 100644 --- a/src/components/create/series/MemoDndCard.tsx +++ b/src/components/create/series/MemoDndCard.tsx @@ -1,6 +1,6 @@ import { useRef } from 'react'; import { useDrag, useDrop } from 'react-dnd'; -import { AiOutlineMinusCircle } from 'react-icons/ai'; +import { AiOutlineMinusCircle } from '@react-icons/all-files/ai/AiOutlineMinusCircle'; import { MemoInfo } from '@/types/series'; type Props = { @@ -96,14 +96,14 @@ export default function MemoDndCard({ }`} data-handler-id={handlerId} > -

+

{title}

); diff --git a/src/components/create/series/SelectCard.tsx b/src/components/create/series/SelectCard.tsx index d3a9a3c5..ba51cc24 100644 --- a/src/components/create/series/SelectCard.tsx +++ b/src/components/create/series/SelectCard.tsx @@ -1,6 +1,7 @@ import { Memo } from '@/types/memo'; import { useState } from 'react'; -import { AiFillCheckCircle, AiOutlineCheckCircle } from 'react-icons/ai'; +import { AiFillCheckCircle } from '@react-icons/all-files/ai/AiFillCheckCircle'; +import { AiOutlineCheckCircle } from '@react-icons/all-files/ai/AiOutlineCheckCircle'; type Props = { memo: Memo; @@ -43,7 +44,7 @@ export default function SelectCard({ memo, onClick, seriesId }: Props) { >
{memo.seriesId && memo.seriesId !== seriesId ? ( -
+
다른 시리즈에 속한 메모
) : selected ? ( @@ -53,11 +54,11 @@ export default function SelectCard({ memo, onClick, seriesId }: Props) { )}
-
-

+
+

{memoTitle}

-

+

{memoDescription}

diff --git a/src/components/me/CoverLetterOpenToggle.tsx b/src/components/me/CoverLetterOpenToggle.tsx index 731ceb00..6a131649 100644 --- a/src/components/me/CoverLetterOpenToggle.tsx +++ b/src/components/me/CoverLetterOpenToggle.tsx @@ -4,7 +4,7 @@ import { useDebounce } from '@/hooks/useDebounce'; import { setCoverletterVisibleMode } from '@/service/coverletter'; import { notifyToast } from '@/utils/notify'; import { useEffect, useRef, useState } from 'react'; -import { AiOutlineInfoCircle } from 'react-icons/ai'; +import { AiOutlineInfoCircle } from '@react-icons/all-files/ai/AiOutlineInfoCircle'; type Props = { coverletterIsVisible: boolean; @@ -31,7 +31,7 @@ export default function CoverLetterOpenToggle({ coverletterIsVisible }: Props) { }, [isOnDebounce]); return ( -