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

ECMAScript imports/exports and referencing its default export.ts(2497) #13

Closed
github4es opened this issue Oct 7, 2020 · 1 comment
Closed

Comments

@github4es
Copy link

I'm trying to use this package but I'm getting:
This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.ts(2497)

Instead of this: const stripBom = require('strip-bom');
I am using:
import * as stripBom from "strip-bom";

I enabled "allowSyntheticDefaultImports" in my config file. What is the default export name? How does one use the import style instead of the require one? What is the 'default export"?

Is the import ECMAScript not supported?

Thank you.

@sindresorhus
Copy link
Owner

This is not the place to ask for TypeScript support.

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

No branches or pull requests

2 participants