Skip to content

[angular-builders/custom-esbuild] styles plugins  #1744

Open
@kenjiqq

Description

@kenjiqq

Is your feature request related to a problem? Please describe.
I'm trying to add a esbuild plugin to modify the paths resolved for images in global scss files

"styles": [
    "somestyles.scss"
],
/* somestyles.scss */
.html {
  background-image: url('./images/test.png');
}

build.onResolve({ filter: /\.png$/ }, args => { etc

But if i understand this correctly then the angular builder has multiple esbuild instances running for different contexts, and the current supported plugins are used as "codePlugins" for the instance that bundles the typescript files only.

Describe the solution you'd like
Would be nice if it was possible to provide plugins for the other esbuild contexts as well. I'm guessing there are other contexts then just global styles as well it could be useful for, i didn't investigate what all the different instances was used for.

Describe alternatives you've considered
Not sure there are alternatives for esbuild, using the webpack builder will probably work.

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