Skip to content

Commit

Permalink
Merge pull request #13 from Codeit-Part4-SFJs/hj/icon
Browse files Browse the repository at this point in the history
feat: Icon(Icon, Loading, Logo) 공통 컴포넌트 구현
  • Loading branch information
hyunjun9788 authored May 22, 2024
2 parents 915e5e3 + 48b42a7 commit 81d8980
Show file tree
Hide file tree
Showing 32 changed files with 575 additions and 11 deletions.
28 changes: 27 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
webpack(config) {

const fileLoaderRule = config.module.rules.find((rule) =>
rule.test?.test?.('.svg'),
)

config.module.rules.push(
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/,
},

{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },
use: ['@svgr/webpack'],
},
)

fileLoaderRule.exclude = /\.svg$/i

return config
},
};

export default nextConfig;
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"dependencies": {
"autoprefixer": "^10.4.19",
"next": "14.2.3",
"next-plugin-svgr": "^1.1.10",
"react": "^18",
"react-dom": "^18",
"react-query": "^3.39.3",
Expand All @@ -29,6 +30,7 @@
"@storybook/nextjs": "^8.1.1",
"@storybook/react": "^8.1.1",
"@storybook/test": "^8.1.1",
"@svgr/webpack": "^8.1.0",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
Expand Down
3 changes: 3 additions & 0 deletions public/icon/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/icon/bubble.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/category.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/drop-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/drop-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/kakao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/icon/kakaotalk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icon/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 81d8980

Please sign in to comment.