Skip to content

Commit

Permalink
Merge pull request #634 from thebuilder/fix/legacy-module
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder authored Jun 20, 2023
2 parents ff7289f + b24d9b2 commit a296737
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
"source": "./src/index.tsx",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"module": "./dist/esm/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./test-utils": {
Expand All @@ -28,6 +28,7 @@
"prebuild": "rm -rf dist lib",
"build": "run-s build:*",
"build:bundle": "tsup src/index.tsx",
"build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean --no-dts --target es2020",
"build:utils": "tsc -p tsconfig.test.json",
"build:copy": "node scripts/build-copy.js",
"postbuild": "size-limit",
Expand Down
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
sourcemap: true,
dts: true,
clean: true,
target: 'es2020',
target: 'esnext',
external: ['react'],
format: ['esm', 'cjs'],
});

1 comment on commit a296737

@vercel
Copy link

@vercel vercel bot commented on a296737 Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.