Skip to content

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

Open
rschristian wants to merge 1 commit into
aholachek:masterfrom
rschristian:refactor/esm-file-paths
Open

refactor: Add explicit file paths/extensions to all source files in flip-toolkit to appease TS#227
rschristian wants to merge 1 commit into
aholachek:masterfrom
rschristian:refactor/esm-file-paths

Conversation

@rschristian
Copy link
Copy Markdown
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