Skip to content

Commit

Permalink
fix(testing): Use .mjs for esm exports (#3270)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
  • Loading branch information
gcascio and anagstef authored Apr 26, 2024
1 parent 0a825dc commit d921bfa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-ladybugs-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/testing': patch
---

Use the .mjs extension to export esm modules instead of relying on tsup's legacy output directory structure
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"./playwright": {
"import": {
"types": "./dist/types/index.d.ts",
"default": "./dist/esm/index.js"
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/playwright/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"main": "../dist/index.js",
"module": "../dist/esm/index.js",
"module": "../dist/index.mjs",
"types": "../dist/types/index.d.ts"
}
1 change: 0 additions & 1 deletion packages/testing/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default defineConfig(overrideOptions => {
clean: true,
sourcemap: true,
format: ['cjs', 'esm'],
legacyOutput: true,
define: {
PACKAGE_NAME: `"${name}"`,
PACKAGE_VERSION: `"${version}"`,
Expand Down

0 comments on commit d921bfa

Please sign in to comment.