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

Usage with TypeScript #1

Open
stolinski opened this issue Apr 18, 2021 · 3 comments
Open

Usage with TypeScript #1

stolinski opened this issue Apr 18, 2021 · 3 comments

Comments

@stolinski
Copy link

Have you had any issues using this with TS? I'm getting

 > import-glob:./**/*:2:305: error: Could not resolve "startAPI.ts" (mark it as external to exclude it from the bundle)
    2 │ ...s.ts';import * as module6 from 'startAPI.ts'
      ╵                                   ~~~~~~~~~~~~~

When trying to use for the first time. I can provide a better reproduction if you'd like, on ESBuild 0.11.12

@stolinski
Copy link
Author

I've found a solution to my issue, but I'd like to present it to you here first before making a pr.
The import string on

.map((module, index) => `import * as module${index} from '${module}'`)

Needed to be import * as module${index} from './${module}' otherwise, it would tell me that it can't find import whatever from 'file.ts' rather than './file.ts'

LMK what you think.

@Intrepidd
Copy link

Seeing the same issue here :)

@hasparus
Copy link

Same one here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants