From 827dac5e036840a664053b1659a818628bbb27b6 Mon Sep 17 00:00:00 2001 From: Veniamin Krol <153412+vkrol@users.noreply.github.com> Date: Sun, 11 Aug 2019 11:15:00 +0300 Subject: [PATCH] Do not minify bundles --- .size-limit.json | 2 +- package.json | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.size-limit.json b/.size-limit.json index 5ba5be4d..4ea93132 100644 --- a/.size-limit.json +++ b/.size-limit.json @@ -1,6 +1,6 @@ [ { - "path": "dist/mobx-react.js", + "path": "dist/mobx-react.umd.js", "limit": "4 KB", "webpack": false, "running": false diff --git a/package.json b/package.json index 0402673b..7c8d3174 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,10 @@ "build": "yarn bundle && yarn copytypes && yarn makern", "copytypes": "shx cp src/index.d.ts dist/mobx-react.d.ts", "makern": "shx cp dist/mobx-react.module.js dist/mobx-react.rn.module.js && yarn replace \"react-dom\" \"react-native\" dist/mobx-react.rn.module.js --silent", - "bundle": "microbundle --jsx React.createElement --external mobx,react,react-dom,mobx-react-lite --globals react-dom=ReactDOM,react=React,mobx-react-lite=mobxReactLite --name mobxReact", + "bundle": "yarn bundle-cjs-and-es && yarn bundle-umd", + "bundle-cjs-and-es": "yarn bundle-via-microbundle --format cjs,es --no-compress", + "bundle-umd": "yarn bundle-via-microbundle --format umd --globals react-dom=ReactDOM,react=React,mobx-react-lite=mobxReactLite --name mobxReact", + "bundle-via-microbundle": "microbundle --jsx React.createElement --external mobx,react,react-dom,mobx-react-lite", "watch": "jest --watch" }, "author": "Michel Weststrate",