-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
One of the requirements of ESM modules is that every import need an extension (see here).
Since it depends on the build toolchain on exactly what extension to use, it can be anyone of the followings js, mjs, cjs, ts, mts and cts.
I suggest adding a specific option called extension that is appended to the import, using the example in the readme it will be modified as follows
// codegen:start {preset: barrel, include: some/path/*.ts, exclude: some/path/*util.ts, extension: mjs}
export * from './some/path/module-a.mjs'
export * from './some/path/module-b.mjs'
export * from './some/path/module-c.mjs'
// codegen:endI glanced the code and I think I can create a PR
jasonkuhrt and shb
Metadata
Metadata
Assignees
Labels
No labels