Closed r3nya closed 8 years ago
Isn't it safer to be more explicit with aliases:
instead of actions
use ^actions\/
@pgilad good catch! :+1:
neat! Do you know if there's a way we can just do imports relative to root without aliases? ex /components/foo
, that would be a tiny bit more elegant I think if possible, instead of having an alias per dir
@tj this is how you can do it
resolve: {
extensions: ['', '.js', '.jsx'],
root: [
path.resolve(__dirname, 'client'),
path.resolve(__dirname, 'node_modules')
],
},
and the you do imports like this:
import Header from 'components/Header'
cool having the ones that don't need to be maintained sounds good to me!
Still like this but we'll have redo it with the above changes
Hey! We can use aliases from webpack to resolve paths.