Skip to content

Commit

Permalink
chore: file-loader 대신 svgr 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
feb-dain committed Aug 17, 2023
1 parent c93eaf1 commit c7eabc8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Loading/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Loading() {
열심히 로딩하고 있어요<span>잠시만 기다려 주세요...</span>
</Message>
<LoadingSvgContainer>
<img src={LoadingSvg} alt="로딩중" />
<LoadingSvg />
</LoadingSvgContainer>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/types/assets.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
declare module '*.svg' {
import React = require('react');
export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
export const ReactComponent: (props: React.SVGProps<SVGSVGElement>) => JSX.Element;
const src: string;
export default src;
export default content;
}
6 changes: 1 addition & 5 deletions frontend/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ module.exports = function () {
test: /\.svg$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/',
},
use: ['@svgr/webpack'],
},
],
},
Expand Down
10 changes: 1 addition & 9 deletions frontend/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@ module.exports = function () {
},
{
test: /\.svg$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'assets/',
},
},
],
use: ['@svgr/webpack'],
},
],
},
Expand Down

0 comments on commit c7eabc8

Please sign in to comment.