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

Add support for custom resolve-url-loader join function #44

Open
jclausen opened this issue Jan 26, 2023 · 0 comments
Open

Add support for custom resolve-url-loader join function #44

jclausen opened this issue Jan 26, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jclausen
Copy link
Collaborator

In the previous version of elixir, URLs in SCSS files which could not be resolved were ignored. Current version of sass-loader are more strict about being able to locate the asset. There are workarounds ( discussed in PR #42 ), however the correct method of handling these on an application-by-application basis is to use the custom join closure functionality in the current version of resolve-url-loader.

Add the ability to provide a custom join closure to the Elixir config, which will be sourced in to the resolve-url-loader config at the time SCSS files are mixed.

Example:

elixir.urlResolver = ( { isAbsolute, bases: { substring, value, property, selector} }, { root }) 
                                     =>  isAbsolute ? [root] : [subString, value, property, selector]
@jclausen jclausen added the enhancement New feature or request label Feb 22, 2023
@jclausen jclausen self-assigned this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant