Document the requirement of tooling support for package.exports
jasonkuhrt opened this issue · comments
I disagree with your stance on this. Many people rely on this library and you introduced a breaking, non-backwards compatible change.
Here is my TS config. There is nothing wrong or outdated about it. This library should not be breaking
{
"compilerOptions": {
"allowJs": false,
"declaration": false,
"esModuleInterop": true,
"incremental": true,
"inlineSources": true,
"isolatedModules": true,
"lib": ["ESNext"],
"module": "Node16",
"moduleResolution": "Node16",
"noEmitOnError": true,
"outDir": "./dist",
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"sourceRoot": "/",
"strict": true,
"target": "ES6"
},
"exclude": ["dist", "node_modules"]
}
@jakeleventhal Your moduleResolution
looks correct. If you want to share a repro repo I'll take a look at some point. You can make a new issue for that. Your comment is off topic from this issue which is about documentation mentioning the necessary TS setup.
Thanks @jakeleventhal! I'll try to take a look this week.
@jasonkuhrt it might be worth it to integrate publint
and @arethetypeswrong/cli
to automate the quality checks on CI.
Nice I'll take a look!
@jakeleventhal The issue is your config, its literally in the message you put in your README.
> src/index.ts:1:31 - error TS2307: Cannot find module 'graphql-request' or its corresponding type declarations.
There are types at '/Users/jakeleventhal/Code/graphql-request-type-issue/packages/test/integrations/node_modules/graphql-request/build/entrypoints/main.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
1 import { GraphQLClient } from "graphql-request";
I'm locking this issue as it has been resolved.