Guys, Next today not working with non-relative paths. I was thinking in implement something using that: https://github.com/tleunen/babel-plugin-module-resolver
The big deal is: When use a custom server, with a custom DIR, where in next can I edit the babel settings for look the root as the config dir and not the original root dir?
Are you looking for something like this?
Anyway, could you explain a bit more about what you are trying to achieve?
@arunoda I think that both have the same solution with different approaches. The point here, is why not do this in Next .babelrc point to the root dir of the project. :thinking:
The point here, is why not do this in Next .babelrc point to the root dir of the project
Sorry. I didn't get this?
The last time that I tried, next not have module-resolver in your core @arunoda. I had to use relative paths everywhere, in a structure with many namespaces, we need to use much ../../../ and this can be a little confuse. My ideia is implements one of this plugins in next for people can call modules direct from root and stop to using relative :)
@guidiego you can make your own webpack configuration, adding alias to solve this problem.
To use this in server side, just use module-alias.
This way worked for me =)
I think there's something similar too.
We are not going to do this in the core.
Just simply add a babel-plugin. I prefer this: https://github.com/tleunen/babel-plugin-module-resolver
And @fdaciuk mentioned some other cases too.
We'll may think something about this later on. But not now.
Most helpful comment
I think there's something similar too.
We are not going to do this in the core.
Just simply add a babel-plugin. I prefer this: https://github.com/tleunen/babel-plugin-module-resolver
And @fdaciuk mentioned some other cases too.
We'll may think something about this later on. But not now.