Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kenjiqq opened this issue Apr 9, 2024 · 2 comments
Open

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

kenjiqq opened this issue Apr 9, 2024 · 2 comments

Comments

@kenjiqq
Copy link

kenjiqq commented Apr 9, 2024

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.

@arturovt
Copy link
Collaborator

I might be misunderstanding, but I'm not certain how this question is connected to custom-esbuild, as we solely offer the API over Angular's public API. We don't provide any custom functionality or extensions beyond what Angular devkit exposes publicly.

@kenjiqq
Copy link
Author

kenjiqq commented Apr 30, 2024

I see, so angular devkit would need to expose more hooks into the other eslint instances they are running before this would be possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants