From f5693cdac266075025fe05667c036741e17971c5 Mon Sep 17 00:00:00 2001 From: Anver Sadutt Date: Thu, 17 Feb 2022 02:49:37 +0530 Subject: [PATCH] Add esm build using microbundle-crl microbundle-crl script is generating only cjs build This causes issues on the latest cra as well as custom build setup --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a097622..cd6ad6b 100644 --- a/package.json +++ b/package.json @@ -8,17 +8,17 @@ "type": "git", "url": "https://github.com/cuongdevjs/reactjs-social-login" }, + "type": "module", "main": "dist/index.js", - "module": "dist/index.js", + "module": "dist/index.modern.js", "typings": "dist/index.d.ts", "source": "src/index.tsx", - "type": "module", "types": "dist/index.d.ts", "engines": { "node": ">=10" }, "scripts": { - "build": "microbundle-crl --format cjs", + "build": "microbundle-crl --format modern,esm,cjs", "start": "microbundle-crl watch --format cjs", "prepare": "run-s build", "test": "run-s test:unit test:lint test:build",