esbuild-plugin-import-glob
esbuild-plugin-import-glob copied to clipboard
Usage with TypeScript
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
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 https://github.com/thomaschaaf/esbuild-plugin-import-glob/blob/d13aa20635b219a944e811938ff29d42b1238b95/src/index.ts#L30
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.
Seeing the same issue here :)
Same one here.