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",