반응형
Svgr
svg 이미지를 자동으로 component화 시켜주는 툴
//install
npm i @svgr/webpack
Svgr 웹팩 설정
//next.config.js
module.exports = {
webpack: (config) => {
console.log('[next.config.js] webpack')
config.module.rules.push({
test: /\.svg$/,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
return config
},
}
postcss
반응형
'FrontEnd > React' 카테고리의 다른 글
[React] 리액트로 사이트 제작하기_1 (AWS S3, Cloudfront, Route53) (0) | 2022.02.27 |
---|---|
React) React-player (0) | 2021.12.26 |
[React] Next.js + Typescript + Redux Toolkit ESLint, prettier 기본설정 (0) | 2021.12.21 |
[React] Next.js + Typescript + Redux Toolkit 프로젝트 셋업 (0) | 2021.12.21 |
[React] Styled-Components (0) | 2020.04.25 |