Skip to content

Imports choking esbuild --bundle #341

@cfv1984

Description

@cfv1984

Hi! For a toy project of mine I used koa-views, which uses consolidate, and noticed that the way consolidate does requires chokes up esbuild --bundle, causing me to have to manually mark every single template engine I'm not using as external, which in esbuild means it won't care for them.

This however is quite a chore and if there's ever a change in the supported engines will mean I'll have to update this list by hand which is ... not ideal.

One way I thought could potentially work -and will likely test for viability shortly- is abstracting the require calls such that the bundling tools no longer get confused about all those conditional calls?

I created evanw/esbuild#2033 over at esbuild so someone can at some point have a shot at solving it, but also wanted to let y'all know this is a thing that happens.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions