ECMAScript imports/exports and referencing its default export.ts(2497)
github4es opened this issue · comments
Ed commented
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.
Sindre Sorhus commented
This is not the place to ask for TypeScript support.