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

Importing in JavaScript results in errors #11

Closed
esaiaswestberg opened this issue Sep 28, 2023 · 1 comment
Closed

Importing in JavaScript results in errors #11

esaiaswestberg opened this issue Sep 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@esaiaswestberg
Copy link
Owner

When trying to import using:

import f as 'ts-fuse'
// or
const f = require('ts-fuse')

The resulting object looks like:

{
    "default": {
        "String": [Function],
        "Number": [Function],
        ...
    }
}

This issue can be circumvented by importing like this:

import * as f from 'ts-fuse'
// or
const { default: f } = require('ts-fuse')

The issue is probably caused by the esbuild stage of publishing.

@esaiaswestberg esaiaswestberg added the bug Something isn't working label Sep 28, 2023
@esaiaswestberg
Copy link
Owner Author

This issue can possibly be helpful:
evanw/esbuild#17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant