Closed thales-gaddini closed 6 years ago
@thales-gaddini The answer is yes. You can achieve the goal with the following configuration.
module.exports = {
"settings": {
"import/resolver": {
"alias": [
["apis", "./app/apis"],
["constants", "./app/constants"],
["state", "./app/state"],
["utilities", "./app/utilities"],
]
}
}
}
@thales-gaddini I feel so sorry that I have just realized I misled you about this issue. The configuration is right, but there's a bug(#5) with the plugin which led to your trouble. The bug has been fixed now and you will get what you want by upgrading its version to 1.1.1. Sorry for that again.
Hello, did this bugfix still is in 1.1.2 version ? i have the same issue, i can't create alias for subfolders
in my case, this work :
module.exports = {
settings: {
'import/resolver': {
alias: {
map: [
['^Client', './client']
],
extensions: ['.js', '.jsx', '.json']
}
}
}
};
this don't :
module.exports = {
settings: {
'import/resolver': {
alias: {
map: [
['^Components', './client/components']
],
extensions: ['.js', '.jsx', '.json']
}
}
}
};
Thank you !
@seloger-AmblardJulien Can you provide the simplified source code and file structure of your project to help me to reproduce the problem better.
Hi, thanks for the plugin!
I wanted to know if the plugin accepts something like this?
If yes, do you know why I'm having trouble with that configuration? If no, think this could be an enhancement?
Thanks again!