next.js에 Styled Components 적용을 위한 .babelrc 설정

c08h·2019년 10월 30일
0

프로젝트의 최상위 경로에 .babelrc 파일을 생성하고 다음 내용을 입력한다.

{
  "presets": ["next/babel"],
  "plugins": [
    [
      "styled-components",
      {
        "ssr": true, // 서버사이드 렌더링 옵션
        "displayName": true, // 태그 class명에 디렉토리, 컴포넌트명 추가
        "preprocess": false
      }
    ]
  ]
}
profile
나는 좋아한다 프론트엔드 개발을

0개의 댓글