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

Remove: flag allowSyntheticDefaultImports from ts config #282

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

forij
Copy link
Contributor

@forij forij commented Jan 19, 2023

Problem: by default TS dosen't allow "synthetic default imports"

Screen.Recording.2023-01-19.at.02.31.16.mp4

Local solution:

Add the line allowsynthgeticsdefaultports: true to the tsconfig.json

Global solution

Change import React from 'react'; => import * as React from 'react'; in pcui repo. This change will allow use pcui without set "allowSyntheticDefaultImports: true" flag in tsconfig.json.

( if you not appruve that pr please add some message about this flag in documentation, for people who want to use pcui with typescript )

Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the answers here, I believe you're correct. Thanks for the PR!

@ellthompson ellthompson merged commit 5db9da1 into playcanvas:main Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants