sindresorhus / strip-bom

Strip UTF-8 byte order mark (BOM) from a string

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

github4es opened this issue · comments

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.

This is not the place to ask for TypeScript support.