-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "root" config option does not seem to work #417
Comments
What is the extensions for the files you'd like to be transformed? I'm using typescript and I specifically need to add an "extensions" key to my config. This worked for me: [
"module-resolver",
{
"root": ["./"],
"extensions": [".ts", ".tsx"]
}
] |
It looks like the defaults are |
I'm passing it through the babel CLI from my This is what I'm using: |
Nevermind. It was a problem with babel-register. |
I couldn't make the
root
option work.Here is my project structure.
I'm running the scripts from the
ROOT
.My goal: both
src
folders on./src
and./cloudRun/src
use path aliases that should point to the./distApp
folder, which cointains all the transpiled files for the app code.So I go this on my
babel.config.js
:From the module-resolver #root docs I've read, I think it should be working. But it's not. In fact, I've tried many things for the
root
property, and it does't even seem to make any different in the resulting paths.In theory all path aliases from files in
./src
and./cloudRun/src
should be converted as if./cloudRun
what theroot
to resolve those paths, right?Anyway, I got it to work with this:
I got rid of the
root
property and exchanged it tocwd: "packagejson"
which, as per the docs:Why does it work with the
root
property?The text was updated successfully, but these errors were encountered: