Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Require on Node.js #90

Closed
lucaperret opened this issue May 2, 2018 · 1 comment
Closed

Require on Node.js #90

lucaperret opened this issue May 2, 2018 · 1 comment

Comments

@lucaperret
Copy link

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [x] question about how to use this project

  • Summary
    Hi there,
    I'm using the generated build within Node.js application.
    I've a typescript file (in src/lib) that exports a default class and several interfaces.
    When trying to require the CommonJS file, I have to do that:

const lib = require('my-lib').default;

How to handle javascript module and CommonJS ?

@bitjson
Copy link
Owner

bitjson commented Sep 2, 2020

Hi there – that code snippet seems to be the right way to import from a CommonJS project. If you're still having trouble, feel free to open a new issue!

@bitjson bitjson closed this as completed Sep 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants