You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"usage" : 이 파일에서 사용하는 feature이고 target environment에서 지원하지 않는 것에 대한 폴리필을 import하는 것을 파일의 최상단에 추가한다.
In
// first file:varset=newSet([1,2,3]);// second file:vararray=Array.of(1,2,3);
Out
// first file:import'core-js/modules/es.array.iterator';import'core-js/modules/es.object.to-string';import'core-js/modules/es.set';varset=newSet([1,2,3]);// second file:import'core-js/modules/es.array.of';vararray=Array.of(1,2,3);
✔ Jest
✔ Babel
플러그인 Plugins
프리셋 Presets
@babel/preset-env
.browserslistrc파일에 타겟을 설정하라.core-js의 글로벌 버전을 사용할 때 최적화를 시켜주는 옵션이다.In
out : chrome 71이 타겟이면, 위의 import는 아래 import로 대체된다.
In
Out
Config Option
envconfig에서 사용된다.api.env()함수를 사용하면 envName을 알 수 있다.usageorentry를 사용하면 preset-env는 직접 core-js 모듈을 참조한다.Babel은 어떻게 옵션들을 Merging 하는가