From 464642ee3acd7ca4665101a8859aa54bcc193043 Mon Sep 17 00:00:00 2001 From: Yuchen Liu Date: Wed, 27 Mar 2019 16:43:52 +0800 Subject: [PATCH] feat: emit code in ES Module mode --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 596db2d5c6..d582f95271 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "6.1.0", "description": "Collection of React Hooks", "main": "lib/index.js", + "module": "lib/es/index.js", "files": [ "lib/" ], @@ -11,7 +12,9 @@ "scripts": { "start": "yarn storybook", "test": "echo hmm...", - "build": "tsc", + "build:cjs": "tsc", + "build:es": "tsc -m esNext --outDir lib/es", + "build": "yarn build:cjs && yarn build:es", "clean": "rimraf lib storybook-static", "storybook": "start-storybook -p 6008", "storybook:build": "build-storybook",