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

Avoid forcing allowSyntheticDefaultImports flag #50

Open
kibertoad opened this issue Feb 4, 2023 · 1 comment · May be fixed by #60
Open

Avoid forcing allowSyntheticDefaultImports flag #50

kibertoad opened this issue Feb 4, 2023 · 1 comment · May be fixed by #60

Comments

@kibertoad
Copy link

When compiling TS, following errors is thrown:

    5 export = picocolors
      ~~~~~~~~~~~~~~~~~~~
    This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.

This makes picocolors not an ideal transitive dependency, as it forces dependant projects to use specific TS configuration, which they may want to avoid.

Are there any strong reasons why export = picocolors export style is used?

@prantlf
Copy link

prantlf commented Feb 25, 2024

This appears to work with #60. I modified one more file in addition to changes done for testing the TypeScript integration for #59 and building and running worked:

--- a/tsconfig.json
+++ b/tsconfig.json
@@ -4,6 +4,7 @@
     "module": "CommonJS",
     "esModuleInterop": true,
     "forceConsistentCasingInFileNames": true,
+    "allowSyntheticDefaultImports": false,
     "strict": true,
     "skipLibCheck": true,
     "outDir": "dist",

@prantlf prantlf linked a pull request Feb 25, 2024 that will close this issue
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 a pull request may close this issue.

2 participants