카테고리 없음
MIME Type Error
seandoesdev
2023. 10. 31. 01:36
because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
원인
calendar.js 파일을 불러올 때 content-type 지정하지 않고 파일 경로만 입력해서 발생한 문제이다.
해결
https://developer.mozilla.org/ko/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
이 사이트를 참고해서 파일에 대한 타입을 맞춰주면 된다.
script 태그 내에 type을 지정해주면 오류 해결된다.