Skip to content
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

refactor: Add explicit file paths/extensions to all source files in flip-toolkit to appease TS #227

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rschristian
Copy link
Contributor

Following up from developit/microbundle#1085

Absolutely feel free to discard this -- it's a big change and reaches into coding style/preference a bit. This is essentially what's necessary. With this change, TS outputs "ESM .d.ts" files which has correct file paths.

The best way to test this that I've found is to switch the "moduleResolution" of the tsconfig.json to "node16" and also add "type": "module" in the package.json. There might be another way to get TS to surface errors, not quite sure. I imagine there's an ESLint plugin that could help enforce this too.

Running yarn build && npm pack generates a tarball that https://arethetypeswrong.github.io/ seems to give a thumbs-up for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant