just-jeb / angular-builders

Angular build facade extensions (Jest and custom webpack configuration)
MIT License
1.14k stars 198 forks source link

esbuild plugin options #1661

Open spike-rabbit opened 8 months ago

spike-rabbit commented 8 months ago

Is your feature request related to a problem? Please describe.

esbuild plugins can have options. In that case they are functions which returns the plugin. Like this:

require("esbuild").build({
    // ...
    plugins: [require("my-plugin")(options)],
    // ...
})

Describe the solution you'd like

It would be cool to have a similar configuration options like nx.

{
   "plugins": ["without-options",  { "path" : "with-options", "options" : {}}]
}

Describe alternatives you've considered The only alternative I could imagine is having a wrapper file, that does configuration.

I could provide a PR, if that helps.

just-jeb commented 8 months ago

Sounds good to me, @arturovt what’s your take on it?

just-jeb commented 8 months ago

@spike-rabbit I think you can go ahead and submit a PR. LMK if you need any help.

arturovt commented 8 months ago

I’m a bit busy with fixing the TS resolution issue.