We have file structure like
/common
/src
/componentA
/componentB
And would like to use webpack aliases
resolve: {
alias: {
common: 'common/src'
}
}
to require modules like
require('common/componentA')
Is there any way to teach WebStorm to resolve this to save option by navigation using Ctrl+Click ?
ResourceRoot option doesn't help for this case
It's not possible to get webstorm to read your webpack aliases, so you have to have 2 different "config setups" for this. Just means that you have to maintain webpack's alises and also webstorm's resources.
In webstorm just right click a folder and "Mark directory as" > "Resource root".
This is kind of a duplicate of this and there's a better answer here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.