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

Can I use the alternate search path and searchPath at the same time? #226

Open
AlexStacker opened this issue Dec 26, 2016 · 2 comments
Open

Comments

@AlexStacker
Copy link

AlexStacker commented Dec 26, 2016

Hi, @jonkemp
I want to be able to find the path use alternate search path first and and the option searchPath is not undefined will to be used in next!
I change my local modules getPattern.js code:

    if (files[destPath].searchPaths && searchPath) {
        if(searchPath.startsWith('{')){
            searchPaths = path.resolve(cwd, searchPath.replace('{', '{' + files[destPath].searchPaths+','));
        }else{
            searchPaths = path.resolve(cwd, '{'+ files[destPath].searchPaths + ',' + searchPath +'}');
        }
    }else if (files[destPath].searchPaths || searchPath) {
        searchPaths = path.resolve(cwd, files[destPath].searchPaths || searchPath);
    }

It work fine for me.would you like to add the feature to the next version?

@fn-xiaobo
Copy link

Can you describe the role of alternate search path more clearly?

@AlexStacker
Copy link
Author

It’s been a long time, and I forgot what I was doing at the time. I think it should be close.

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