oklas / react-app-alias

:label: Alias and multiple src directory for craco or rewired create-react-app
MIT License
173 stars 18 forks source link

Option to specify pathname of config file #57

Closed oklas closed 2 years ago

oklas commented 2 years ago

Hi @oklas, use any path that deviates from the pattern ^[jt]sconfig(\.paths)?.json, and the plugin cannot resolve the aliases correctly. This is problematic for two reasons

  1. The documentation doesn't make it explicitly clear, that the only supported file names are those specified by the previous pattern. As a result, individuals may experience compilation failures without any possible reason as to why.
  2. There's no need to restrict the file names. There's no benefit in doing so, and causes more hassle then needed.

For these reasons, I think we should allow users to use different names. We don't have "guess" the name, but rather grab the file path from "extends". What do you think?3

Originally posted by @urmzd in https://github.com/oklas/react-app-alias/issues/42#issuecomment-998283249

oklas commented 2 years ago

Hi @urmzd, about this issue, you can try react-app-alias-2.0.0 and send feedback if any. Use tsconfig or jsconfig option. Thanks

urmzd commented 2 years ago

Hi Oklas, thanks for getting this done, I'm sure it'll make the interface a bit simpler to work with.