Skip to content

Commit 556ed1c

Browse files
committed
fix(entrypoints): modules and esm
1 parent b27403e commit 556ed1c

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
node_modules/
22
coverage/
3-
dist/
3+
index.umd.js
4+
index.umd.js.map
5+
index.modern.js
6+
index.modern.js.map
47
examples/data.json

examples/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ <h1>
120120
<hr style="margin-top: 0" />
121121
<div id="results"></div>
122122
<script type="module">
123-
import { SearchAPI } from "../dist/index.modern.js";
123+
import { SearchAPI } from "../index.modern.js";
124124
const $search = document.getElementById("search");
125125
const $maximum = document.getElementById("maximum");
126126
const $form = document.getElementById("search-form");

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,11 @@
44
"description": "Node.js API client for GOV.UK",
55
"version": "0.0.0-development",
66
"source": "index.js",
7-
"exports": {
8-
"require": "./dist/index.cjs",
9-
"default": "./index.js"
10-
},
11-
"main": "./dist/index.cjs",
12-
"module": "./index.js",
13-
"unpkg": "./dist/index.umd.js",
7+
"main": "index.js",
8+
"module": "index.modern.js",
9+
"unpkg": "index.umd.js",
1410
"scripts": {
15-
"build": "microbundle build --format cjs,umd --external none --alias node-fetch=unfetch,debug=src/debug.browser.js",
16-
"build:dev": "microbundle build --format cjs,umd --external none --alias node-fetch=unfetch",
11+
"build": "microbundle build --format modern,umd --external none --alias node-fetch=unfetch,debug=src/debug.browser.js",
1712
"test": "npm run lint && npm run ava:coverage",
1813
"ava:coverage": "NODE_OPTIONS='--no-warnings --loader=esmock' c8 --100 ava",
1914
"ava": "NODE_OPTIONS='--no-warnings --loader=esmock' ava",

0 commit comments

Comments
 (0)