Skip to content

0.12.4 breaks build for echarts-gl (error: Transforming const to the configured target environment ("ES5") is not supported yet) #1355

@gunters63

Description

@gunters63

Probably related to #1332

Steps to reproduce:

  1. Scaffold a new Vite project with the react-ts template (other templates will likely work too)
  2. Add packages echarts, echarts-for-react and echarts-gl
  3. Add the following lines at the top of App.tsx:
import 'echarts-gl';
import * as echarts from 'echarts';
import ReactECharts from 'echarts-for-react';
  1. Run the dev server

Result: vitejs/esbuild run into errors like this:

 > node_modules/.pnpm/echarts-gl@2.0.4_echarts@5.1.1/node_modules/echarts-gl/lib/component/grid3D/install.js:22:4: error: Transforming const to the configured target environment ("ES5") is not supported yet
    22 │     const AxisView = registers.ComponentView.extend({
       ╵     ~~~~~
   node_modules/.pnpm/echarts-gl@2.0.4_echarts@5.1.1/node_modules/echarts-gl/jsconfig.json:3:18: note: The target environment was set to "ES5" here
     3 │         "target": "ES5"

Esbuild versions prio to 0.12.4 work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions