Skip to content

Commit

Permalink
Merge branch 'main' into feat/#38
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI authored Dec 13, 2023
2 parents 64f8962 + ce6caed commit 57d39a5
Show file tree
Hide file tree
Showing 17 changed files with 412 additions and 44 deletions.
10 changes: 10 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ const config: StorybookConfig = {
}),
];
}

if (config.module) {
if (config.module.rules) {
config.module.rules.unshift({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
}
}

return config;
},
};
Expand Down
7 changes: 7 additions & 0 deletions @types/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare module '*.svg' {
import type React from 'react';

export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
const src: string;
export default src;
}
16 changes: 14 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
webpack: config => {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
});

module.exports = nextConfig
return config;
},
};

module.exports = nextConfig;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@storybook/nextjs": "^7.6.3",
"@storybook/react": "^7.6.3",
"@storybook/test": "^7.6.3",
"@svgr/webpack": "^8.1.0",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
Expand Down
Loading

0 comments on commit 57d39a5

Please sign in to comment.