Component package: Es6 to ES5

Source: Internet
Author: User
1, the first global installation BABEL-CLI, the input command npm install babel-cli-g2, input CD d:\es6 ; ---Enter the folder path 3, enter NPM init, go to the---(Guide you to create a Package.json file, including name, version, author, etc.) 4, enter NPM install--save-dev BABEL-CLI;---(Install command line transcoding BABEL-CLI tool) 5. Create a new configuration file in the Es6 file. BABELRC Copy code {"Presets": [], "plugins": []} Paste into. BABELRC 6, Command Line window input npm install--save-dev babel-preset-es2015;---(Install es2015 dependency) add "es2015". BABELRC
{"Presets": ["es2015", "React", "stage-0"], "plugins": []}
7, input babel-h detection is installed successfully 8, ES6 compiled into ES5 for example: Babel es6.js-o es5.js

Component package: Es6 to ES5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.