How to use Frappe Charts for erpnext version 6

How can i use Frappe Charts for erpnext version 6 im getting
i tried adding it to build json but im getting Uncaught ReferenceError: Chart is not defined
image

i was able to add Frappe Charts on a higher version by adding it
to build.json
and modifying the .eslintrc

but .eslintrc is not yet available on version 6

tried this after npm install
import Chart from "frappe-charts/dist/frappe-charts.min.esm"

but im still getting
Uncaught ReferenceError: Chart is not defined

Resolved

Can you also explain what solved it?