babel-plugin-module-resolver
babel-plugin-module-resolver copied to clipboard
Doesn't respect --config-file when running babel from the cli
I have two different babel config files, when I run babel for my server code I pass in a specific .babelrc-server
file to the CLI option --config-file
but this plugin will ignore that and use the default .babelrc
file
I'm having the same issue, I have a babel config for my Next project and another for my node server.
My solution for now was to add the root for the node project into the array of root directories in the original config.
You are correct though this will need to be fixed, but as a temporary solution this works :)
@carwynstephen Coincidentally, I also getting this with a next setup, could you provide some additional info about what to add to the root in your config. Am I adding the root to the server side code? Do you still have two files or did you combine them into one?
I have two files, my babelnoderc and .babelrc. I put my module resolver confic into .babelrc:
["module-resolver", { "root": [".", "./src"] }]