-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add named export to improve "module": "nodenext"
compatibility
#140
Conversation
* currently it shows error: This expression is not callable. Type 'typeof import("node_modules/vite-plugin-checker/lib/main")' has no call signatures.ts(2349) * see microsoft/TypeScript#48845
it's possible to follow this example as an alternative but that requires deleting |
@fi3ework any objections on merging this one? |
@wight554 thanks for the PR, I was wondering is there way to also use default export in ESM which will be aligned with CJS? |
Ideally |
Does a conditional export works for this? https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-rc/#package-json-exports-imports-and-self-referencing ESM and CJS can use different types entries and we can build different types fils before publishing |
Well having mjs typings requires mjs module, won't it be overhead ti to have 2 versions if plugin if it works as is? |
✅ Deploy Preview for vite-plugin-checker ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@fi3ework added changes to make module cjs style, can you build and attach output
|
I'm not sure if |
I think the previous implementation is simple enough to handle the
I think you're right. Maybe we can export consistently of CJS and ESM in the next minor version. Adding another export is good enough for now. Would like to revert to the prev version and make it merged. Thanks! |
It's valid for CJS, but yeah previous version was cleaner |
This reverts commit ef7a774.
We hope to resolve this in a more ESM flavor way as it's becoming more and more mainstream. |
Done |
There's an extra semicolon that fails the CI 👀 |
fixed |
|
done |
This expression is not callable.
Type 'typeof import("node_modules/vite-plugin-checker/lib/main")' has no call signatures.ts(2349)