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

Fix develop server breaking due to import syntax #824

Merged
merged 4 commits into from
Aug 1, 2022

Conversation

MidhunSureshR
Copy link
Member

No description provided.

Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

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

Can we also document this in doc/ somewhere? A document how to add a dependency from npm ...

import pkg from "off-color";
const {offColor} = pkg;
import * as pkg from "off-color";
const offColor = pkg.offColor ?? pkg.default.offColor;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this would fix the tsc error?

Suggested change
const offColor = pkg.offColor ?? pkg.default.offColor;
const offColor = pkg.offColor ?? pkg.default?.offColor;

@MidhunSureshR MidhunSureshR merged commit 7d3f22c into master Aug 1, 2022
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.

2 participants