webpack.config.js를 들어가서
module.exports = {
experiments: {
topLevelAwait: true,
},
이 코드를 추가해준다. toplevelawait true로 만들어주어 async를 사용하지 않고도 await를 사용하게 해 준다.
'Projcet' 카테고리의 다른 글
Fetch API cannot load localhost:(port&path). URL scheme "localhost" is not supported 에러 (0) | 2022.05.10 |
---|---|
express에 async await 추가 후 webpack build시 에러 해결 (0) | 2022.05.09 |
타입스크립트 에러: Cannot find module 'typescript/bin/tsc' (0) | 2022.04.01 |
타입스크립트 에러 : tsconfig.json: Build:No inputs were found in config file (0) | 2022.04.01 |
package.json dependencies, devdependencies의 차이 (0) | 2022.04.01 |