RTVision/esbuild-dynamic-import

Better docs needed struggling to implement

Closed this issue · 1 comments

so im trying to implement this and i cant seem to works it out

const result = await esbuild.buildSync({
              ...inputOptions,
              plugins: [
                DynamicImport({ changeRelativeToAbsolute: true })
              ]
            });

and its saying that DynamicImport is not a function

Don't know why I am not getting notifications for issues so sorry for the late response.

If this is still an issue does the below comment help you?

// note depending on your setup you may need to do DynamicImport.default() instead

Meaning if DynamicImport is not a function, is DynamicImport.default a function instead?