Skip to content

The requested module '@mobily/ts-belt' is a CommonJS module #117

@timoxley

Description

@timoxley
mport { A } from '@mobily/ts-belt';
         ^
SyntaxError: Named export 'A' not found. The requested module '@mobily/ts-belt' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@mobily/ts-belt';
const { A } = pkg;

Trying to build a project using ts-belt with pkgroll and it's giving me the above error, no matter what tsconfig settings I supply for target/module.

Only seems to affect ts-belt, I'm not sure exactly what the problem is, but perhaps you know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions