JS_babel转码器,es6代码转换成es5代码
官方文档
npm:npm install —save-dev @babel/preset-react
cdn:https://unpkg.com/babel-standalone@6.26.0/babel.js
cdn引入使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>babel</title>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
</head>
<body>
</body>
</html>
<script type="text/babel"> </script>
还没有评论,来说两句吧...