1
오류 때 타이프 라이터에서 JSON 가져 오기Object.defineProperty (내보내기, "__esModule", {값 : true});
오류 메시지 : catch되지 않은 ReferenceError가 : 수출이 정의되지 않은
books.ts
import data from './books.json';
class books{
//...code
constructor(){
//...code
}
}
books.js
"use strict";
**Object.defineProperty(exports, "__esModule", { value: true });**
class books {
//...code
constructor() {
//...code
}
}