From 855ebf552113fb03368d42f2f0a7db03c2023046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sta=C5=9B=20Ma=C5=82olepszy?= Date: Tue, 24 Jul 2018 16:18:20 +0200 Subject: [PATCH] The module field in package.json should point to src/index.mjs Also rename the UMD dist file to /index.js. --- .gitignore | 2 +- Makefile | 6 +++--- package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 161a6e3..fe63006 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules -cached-iterable.js +index.js compat.js diff --git a/Makefile b/Makefile index ff7ee7a..ee2782a 100644 --- a/Makefile +++ b/Makefile @@ -22,9 +22,9 @@ test: --require mocha_config \ test/**/*_test.js -build: $(PACKAGE).js compat.js +build: index.js compat.js -$(PACKAGE).js: $(SOURCES) +index.js: $(SOURCES) @rollup $(CURDIR)/src/index.mjs \ --config $(CURDIR)/bundle_config.js \ --banner "/* $(PACKAGE)@$(VERSION) */" \ @@ -43,5 +43,5 @@ compat.js: $(SOURCES) @echo -e " $(OK) $@ built" clean: - @rm -f $(PACKAGE).js compat.js + @rm -f index.js compat.js @echo -e " $(OK) clean" diff --git a/package.json b/package.json index 058667c..0e786bc 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,8 @@ "directories": { "lib": "./src" }, - "main": "./cached-iterable.js", - "module": "./src/index.js", + "main": "./index.js", + "module": "./src/index.mjs", "repository": { "type": "git", "url": "https://github.com/projectfluent/cached-iterable.git"