Update docs to show how ESM can be imported
This commit is contained in:
parent
81cddd45a3
commit
6e8a303310
@ -271,6 +271,8 @@ redirect_to: "https://frappe.io/charts"
|
||||
<pre><code class="hljs console"> npm install frappe-charts</code></pre>
|
||||
<p>And include it in your project</p>
|
||||
<pre><code class="hljs javascript"> import { Chart } from "frappe-charts"</code></pre>
|
||||
<p>(for ES6+ import the ESModule from the dist folder)</p>
|
||||
<pre><code class="hljs javascript"> import { Chart } from "frappe-charts/dist/frappe-charts.esm.js"</code></pre>
|
||||
<p>... or include it directly in your HTML</p>
|
||||
<pre><code class="hljs html"> <script src="https://unpkg.com/frappe-charts@1.1.0"></script></code></pre>
|
||||
<p>Use as:</p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user