How to configure gulp to convert es6 in .html pages to es5?

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title></title>
</head>

<body>
  <script>
    let name = "alibaba"
    let sayName = (params) => params + `${name}`
    sayName("I am ");
  </script>
</body>

</html>

package with gulp, how to convert the above code, npm run build to es5 syntax after execution, and how to convert npm run dev to es5 syntax

Sep.12,2021

Hello, have you solved this problem? How to achieve it

Menu