WEB/vue

Vue Browser 지원 (ES5, ES6)

MOVE🔥 2020. 6. 11. 17:45
728x90
반응형

 

 

Vue는 ECMAScript 5 기능을 사용하기 때문에 IE8 이하 버전을 지원하지 않습니다. 하지만 모든 ECMAScript 5 호환 브라우저를 지원합니다

 

 

Can I use... Support tables for HTML5, CSS3, etc

About "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers. The site was built and is maintained by Alexis Deveria, with occasional updates provided by the web development commu

caniuse.com

 

많이들 ES6를 사용 하는데 Vue는 ES5까지 지원한다.

 

 

IE의 경우 대부분의 ES6 기능을 지원하지 않는다.

https://kangax.github.io/compat-table/es6/

 

ECMAScript 6 compatibility table

Sort by Engine types Features Flagged features Show obsolete platforms Show unstable platforms V8 SpiderMonkey JavaScriptCore Chakra Carakan KJS Other ⬤ Minor difference (1 point) ⬤ Small feature (2 points) ⬤ Medium feature (4 points) ⬤ La

kangax.github.io

 

 

때문에 ES6를 호환가능한 ES5로 변환해주는 babel을 사용하기로 했다.

 

 

1. Install

npm install --save @babel/polyfill

 

2. Main.js 상단에 import

import '@babel/polyfill'

 

해당 작업을 하고 build하면 IE11에서 잘돌아가는 것을 확인 할 수 있다.

 

728x90
반응형