From 9e2d04684f1aea19658f01202153fca839c3d906 Mon Sep 17 00:00:00 2001 From: Massimiliano Torromeo Date: Wed, 19 Dec 2018 12:02:44 +0100 Subject: [PATCH] Add esm module distribution --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 24f606a..b7492fd 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "3.5.0", "description": "Async computed properties for Vue", "main": "dist/vue-async-computed.js", + "module": "dist/vue-async-computed.esm.js", "files": [ "bin/", "dist/" @@ -14,8 +15,9 @@ "watch": "watch 'npm run build' src test", "test": "babel-node --presets env test/index.js | tspec", "prebuild": "npm run check -s && npm run clean -s && mkdirp dist", - "build": "npm run rollup -s && npm run babel -s", - "rollup": "rollup src/index.js --output.format umd --name AsyncComputed --output.file dist/vue-async-computed.esnext.js", + "build": "npm run rollup-esm -s && npm run rollup-umd -s && npm run babel -s", + "rollup-esm": "rollup src/index.js --output.format esm --name AsyncComputed --output.file dist/vue-async-computed.esm.js", + "rollup-umd": "rollup src/index.js --output.format umd --name AsyncComputed --output.file dist/vue-async-computed.esnext.js", "babel": "babel --optional runtime dist/vue-async-computed.esnext.js --out-file dist/vue-async-computed.js", "postbuild": "npm run test -s", "coverage": "node_modules/.bin/babel-node node_modules/.bin/babel-istanbul cover test/index.js",