This may be a playwright issue, but I discovered that running npx playwright test would get this error if it did not have a default exports:
Error: No "exports" main defined in /.../package.json
Adding 1 line fixed it, so I'm wondering if this should be the default (heh :D):
"exports": {
".": {
+ "default": "./dist/index.js",
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"scripts": {
"build": "zshy",
"lint": "tsc --noEmit"
}
}
I know I can auto-generation of exports and do it myself, but I'm wondering if this should be default behavior.
https://github.com/colinhacks/zshy?tab=readme-ov-file#can-i-prevent-zshy-from-modifying-my-packagejson
This may be a
playwrightissue, but I discovered that runningnpx playwright testwould get this error if it did not have adefaultexports:Adding 1 line fixed it, so I'm wondering if this should be the default (heh :D):
"exports": { ".": { + "default": "./dist/index.js", "types": "./dist/index.d.ts", "import": "./dist/index.js" } }, "scripts": { "build": "zshy", "lint": "tsc --noEmit" } }I know I can auto-generation of
exportsand do it myself, but I'm wondering if this should be default behavior.