-
Notifications
You must be signed in to change notification settings - Fork 104
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
Problem when using a custom configFile name #31
Comments
@Jontem Do you have an idea of what could be the issue? |
Can you do a minimal repro ? |
tsconfig-paths-webpack-plugin accepts a parameter called configFile, which is supposed to be the path to any custom tsconfig.json file. As you can see here, this parameter is passed to TsConfigPaths.loadConfig, even though the definition of loadConfig takes in only a cwd parameter Further down the call stack, in tsconfig-loader.ts, this leads to the cwd parameter being the path to tsconfig, while filename being undefined, which leads to a directory walk searching for tsconfig.json, which in turn leads to this issue. |
@andrewhathaway I released tsconfig-paths-webpack-plugin 3.0.3 which will hopefully fix this. |
Ahh great stuff, thanks all involved! I was just about to prepare a minimal repro! |
Using
tsconfig-paths-webpack-plugin
, when setting theconfigFile
option, it seems to go missing and doesn't work. I'm submitting the issue here, as after having a look, there's something strange going on internally to this package.When passing the configFile option, the
cwd
variable gets set to the configFile's value that I passed through. At the line in the link, it's the options value: https://github.com/dividab/tsconfig-paths/blob/master/src/tsconfig-loader.ts#L39However, after running the
resolveConfigPath
it's completely lost and becomes the standard absolute path fortsconfig.json
, nottsconfig.production.json
in my case.I can also confirm that the
TS_NODE_PROJECT
env var is undefined, and won't run the codepath forif (filename) ...
.Essentially it seems that even though the
configFile
option is passed through to this package, it doesn't actually care for it and throws it out later on.The text was updated successfully, but these errors were encountered: