From 6e8a303310e1cb9728ae9b1d8afcd651a393a7d0 Mon Sep 17 00:00:00 2001 From: ajv Date: Thu, 25 Oct 2018 16:56:39 +0300 Subject: [PATCH] Update docs to show how ESM can be imported --- docs/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/index.html b/docs/index.html index 8c77cad..8f8da02 100644 --- a/docs/index.html +++ b/docs/index.html @@ -271,6 +271,8 @@ redirect_to: "https://frappe.io/charts"
  npm install frappe-charts

And include it in your project

  import { Chart } from "frappe-charts"
+

(for ES6+ import the ESModule from the dist folder)

+
  import { Chart } from "frappe-charts/dist/frappe-charts.esm.js"

... or include it directly in your HTML

  <script src="https://unpkg.com/frappe-charts@1.1.0"></script>

Use as: