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

config: update verbatimModuleSyntax in lenient tsconfig.json #103

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

Conversation

dv-usama-ansari
Copy link
Contributor

What is verbatimModuleSyntax?

Why do we need it?

  • Without verbatimModuleSyntax:

image

We see no errors when an import which can be used only as a type. This would lead to increased bundle size, since it would also compile the imports within the module.
Also, coming from datavisyn/visyn_core@274fcfb#diff-c767fb22b4d7242d9d2848e5d53d098f77647cf31592ceed92875cbafdce2684, we have run into this problem where the module contained interfaces as well as React imports from a component and the bundler messed up the entire setup which led everything to crash

  • With verbatimModuleSyntax enabled:

image

We see errors right in the editor which suggests to import type instead of the interface name so that it is excluded from bundling.
These lint errors are autofixable (unfortunately not from the CLI)

image

@dv-usama-ansari dv-usama-ansari requested a review from a team as a code owner October 28, 2024 11:59
@dv-usama-ansari dv-usama-ansari changed the title config: update verbatimModuleSyntax in lenient tsconfig.json config: update verbatimModuleSyntax in lenient tsconfig.json Oct 28, 2024
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