From c6f801a1b35d8dea01e2a560e980c750619e1d8c Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Thu, 3 Jun 2021 12:21:19 +0800 Subject: [PATCH] esm target is built by esbuild so dependents don't need classProperties --- js/.gitignore | 1 + js/package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/.gitignore b/js/.gitignore index 6736aa1..651896c 100644 --- a/js/.gitignore +++ b/js/.gitignore @@ -1,2 +1,3 @@ node_modules index.js +index.mjs diff --git a/js/package.json b/js/package.json index b075359..0b0403e 100644 --- a/js/package.json +++ b/js/package.json @@ -12,7 +12,9 @@ ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "esbuild index.mjs --outfile=index.js --target=es2015 --global-name=pmtiles --format=iife" + "build-iife": "esbuild index.src.mjs --outfile=index.js --target=es2015 --global-name=pmtiles --format=iife", + "build-esm": "esbuild index.src.mjs --outfile=index.mjs --target=es6 --global-name=pmtiles --format=esm", + "build":"npm run build-iife && npm run build-esm" }, "homepage": "https://github.com/protomaps/pmtiles", "author": "Brandon Liu",