From 8e1bd6859a2421ac283bb0bdfc959f5508ab11aa Mon Sep 17 00:00:00 2001
From: Dave Lunny <4298089+himynameisdave@users.noreply.github.com>
Date: Sun, 11 Apr 2021 03:23:19 -0700
Subject: [PATCH] feat: use UMD instead of IIFE for browser target (#336)
---
README.md | 9 ++++-----
package.json | 2 +-
rollup.config.js | 2 +-
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index f29132b..2736bfd 100644
--- a/README.md
+++ b/README.md
@@ -18,8 +18,8 @@
-
-
+
+
@@ -58,9 +58,9 @@
* ...or include within your HTML
```html
-
+
-
+
```
#### Usage
@@ -152,4 +152,3 @@ This repository has been released under the [MIT License](LICENSE)
------------------
Project maintained by [Frappe](https://frappe.io).
Used in [ERPNext](https://erpnext.com). Read the [blog post](https://medium.com/@pratu16x7/so-we-decided-to-create-our-own-charts-a95cb5032c97).
-
diff --git a/package.json b/package.json
index adddfa5..9086f9f 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,7 @@
"main": "dist/frappe-charts.min.cjs.js",
"module": "dist/frappe-charts.min.esm.js",
"src": "dist/frappe-charts.esm.js",
- "browser": "dist/frappe-charts.min.iife.js",
+ "browser": "dist/frappe-charts.min.umd.js",
"directories": {
"doc": "docs"
},
diff --git a/rollup.config.js b/rollup.config.js
index a17743a..758735a 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -48,7 +48,7 @@ export default [
},
{
file: pkg.browser,
- format: 'iife',
+ format: 'umd',
}
],
name: 'frappe',