개발/Vue

font-family에서 글꼴을 찾지 못하는 오류

반응형

@font-face{

  font-family:"NanumGothic";

  src:url('src/assets/fonts/NanumGothic.eot'),

  url('src/assets/fonts/NanumGothic.eot?#iefix'format('embedded-opentype'),

  url('src/assets/fonts/NanumGothic.woff'format('woff')

}

 

이렇게 작성하고 빌드하면 글꼴을 찾지 못하는 오류가 있었다.

 

@font-face{

  font-family:"NanumGothic";

  src:url('~@/dataplatform/assets/fonts/NanumGothic.eot'),

  url('~@/dataplatform/assets/fonts/NanumGothic.eot?#iefix'format('embedded-opentype'),

  url('~@/dataplatform/assets/fonts/NanumGothic.woff'format('woff');

}

 

vue.config.js 에서 설정한 alias로 바꾸고 하면 된다.

 

주의 : 마지막에 ;(세미콜론)  넣어야 함

반응형

'개발 > Vue' 카테고리의 다른 글

프로젝트 구성  (0) 2021.03.30
vue cli3란?  (0) 2021.03.30