Skip to content

Commit

Permalink
fix: add esm as fallback module
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder committed Jun 20, 2022
1 parent e59d9c2 commit 57da6c3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
"source": "./src/index.tsx",
"main": "./dist/react-intersection-observer.js",
"module": "./dist/react-intersection-observer.mjs",
"module": "./dist/react-intersection-observer.esm.js",
"unpkg": "./dist/react-intersection-observer.umd.js",
"types": "./dist/index.d.ts",
"exports": {
"./test-utils": "./test-utils.js",
"./test-utils": {
"default": "./dist/test-utils.js",
"types": "./dist/test-utils.d.ts"
},
".": {
"require": "./react-intersection-observer.js",
"default": "./react-intersection-observer.modern.mjs"
"module": "./dist/react-intersection-observer.esm.js",
"require": "./dist/react-intersection-observer.js",
"default": "./dist/react-intersection-observer.modern.mjs",
"types": "./dist/index.d.ts"
}
},
"unpkg": "./dist/react-intersection-observer.umd.js",
"typings": "./dist/index.d.ts",
"files": ["dist", "README.md", "LICENSE", "package.json"],
"author": "Daniel Schmidt",
"sideEffects": false,
"repository": {
Expand Down Expand Up @@ -51,7 +57,6 @@
"build": "run-s build:*",
"build:bundle": "microbundle --name ReactIntersectionObserver --jsx React.createElement -f cjs,umd,es,modern --no-compress",
"build:utils": "tsc -p tsconfig.test.json",
"build:copy": "node scripts/build-copy.js",
"postbuild": "size-limit",
"dev": "yarn run storybook",
"lint": "eslint . --ext js,ts,tsx",
Expand All @@ -73,12 +78,7 @@
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/npm",
{
"pkgRoot": "dist"
}
],
"@semantic-release/npm",
"@semantic-release/github"
]
},
Expand All @@ -96,19 +96,19 @@
},
"size-limit": [
{
"path": "dist/react-intersection-observer.mjs",
"path": "dist/react-intersection-observer.esm.js",
"name": "InView",
"import": "{ InView }",
"limit": "1.8 kB"
},
{
"path": "dist/react-intersection-observer.mjs",
"path": "dist/react-intersection-observer.esm.js",
"name": "useInView",
"import": "{ useInView }",
"limit": "1.3 kB"
},
{
"path": "dist/react-intersection-observer.mjs",
"path": "dist/react-intersection-observer.esm.js",
"name": "observe",
"import": "{ observe }",
"limit": "1 kB"
Expand Down

0 comments on commit 57da6c3

Please sign in to comment.