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

Use relative paths and options.paths together #57

Open
monochromer opened this issue Jun 21, 2019 · 1 comment · May be fixed by #66
Open

Use relative paths and options.paths together #57

monochromer opened this issue Jun 21, 2019 · 1 comment · May be fixed by #66

Comments

@monochromer
Copy link

monochromer commented Jun 21, 2019

We want to use this scenario in our project.

If the path is /common-icons/icon.svg then it must be resolved with options.paths in mind.
If such path is specified ./icon.svg, it should be resolved relatively current location.

Is that possible?
The plugin now searches either only options.paths or only relative paths.

Maybe you should make an option for custom path resolution?

getPath: function(file, url, options) {
  // ...
  return /* some computed url */
}
@monochromer monochromer changed the title Use relative paths and options'.paths together Use relative paths and options.paths together Jun 21, 2019
@hudochenkov
Copy link
Collaborator

It could be an interesting idea. Feel free to send a PR.

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