Skip to content

Commit

Permalink
Revert "fix(pkg): add a default fallback export (#733)"
Browse files Browse the repository at this point in the history
This reverts commit 81720c7.
  • Loading branch information
wolfy1339 committed May 2, 2024
1 parent 4aed459 commit 8251b8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ There is one method for each REST API endpoint documented at [https://developer.

## TypeScript

> [!IMPORTANT]
> As we use [conditional exports](https://nodejs.org/api/packages.html#conditional-exports), you will need to adapt your `tsconfig.json` by setting `"moduleResolution": "node16", "module": "node16"`.
>
> See the TypeScript docs on [package.json "exports"](https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-exports).<br>
> See this [helpful guide on transitioning to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) from [@sindresorhus](https://github.com/sindresorhus)
Parameter and response types for all endpoint methods exported as `{ RestEndpointMethodTypes }`.

Example
Expand Down
3 changes: 1 addition & 2 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ async function main() {
{
...pkg,
files: ["dist-*/**"],
main: "./dist-src/index.js",
types: "./dist-types/index.d.ts",
exports: {
".": {
import: "./dist-src/index.js",
types: "./dist-types/index.d.ts",
// Tooling currently are having issues with the "exports" field when there is no "default", ex: TypeScript, eslint
default: "./dist-types/index.js",
},
},
sideEffects: false,
Expand Down

0 comments on commit 8251b8e

Please sign in to comment.