Resolving webpack custom module paths
mnowotnik opened this issue · comments
Michał Nowotnik commented
Just wanted to share my solution to the problem I encountered with additional module paths
in my webpack config.
Imports like:
import MyComponent from 'src/components/MyComponent';
are resolved by webpack using the resolve.modules option.
webpack-isomorphic-tools cannot resolve those paths by its own. To enable
custom modules resolution simply set up babel-plugin-module-resolver exactly as in Readme.
Nikolay commented
Oh, resolving via Babel is really the right way to go.
I see more and more older hacks being removed via babel plugins.
Elegant enough.