A JavaScript project is setup with webpack path resolver like this:
resolve: {
alias: {
'~': path.resolve(cwd, 'src')
}
},
This has the effect that a line in c:/projects/myproject/src/models/User.js
import '~/config/global';
will point to c:/projects/myproject/src/config/global.js
.
Can I setup find-file-at-point
(or any other interactive function) so that when in User.js
the point is at the file path ~/config/global.js
and I invoke f-f-a-p
(or other magic), the global.js
file is opened?
I.e., can I replace the meaning of ~
on a per-project or global basis?
This is Windows 10 if it makes a difference.