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 'root' option and 'urlTransform' option #25

Closed
gauntface opened this issue Aug 10, 2017 · 3 comments
Closed

Add 'root' option and 'urlTransform' option #25

gauntface opened this issue Aug 10, 2017 · 3 comments
Assignees

Comments

@gauntface
Copy link

CSS imports can be absolute paths on a web server where '/styles/...' could be a valid server path, but relate to a different path on the file systme (i.e. '/public/styles/...'). Would you be open to adding the following options to solve this use case:

  • root: A path that is pre-pended to absolute paths used
  • urlTransform: a function that is called with each discovered importPath and can return an alternative import path (allows developers to use a development version of a file while working on the source but switch to an optimsed version later on).
@unlight
Copy link
Owner

unlight commented Aug 10, 2017

@gauntface
Seems that urlTransform more general approach and overlaps root feature.
Why do we need both?

@gauntface
Copy link
Author

Agreed, root would just cover the most common use case and urlTransform is the more involved option

@unlight unlight self-assigned this Aug 11, 2017
@unlight
Copy link
Owner

unlight commented Aug 12, 2017

Implemented transform option in v5.1.x

@unlight unlight closed this as completed Aug 13, 2017
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