Skip to content
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

existing aliases #84

Open
its-dibo opened this issue Sep 29, 2021 · 1 comment
Open

existing aliases #84

its-dibo opened this issue Sep 29, 2021 · 1 comment

Comments

@its-dibo
Copy link

  • the docs here doesn't explain how this plugin handles the existing config.resolve.alias elements, if both aliases and this plugin exists in the same config object.

  • how one can see the final aliases set by this plugin in a real project (not tests)
    especially when multiple webpack config files extend and override each other and there is a probability for errors here
    without it we can use something like this console.log(config.resolve.alias);

  • if a webpack.config file extends another 'base' config file that includes this plugin, do we need to add this plugin again to the new webpack config file?
    example:

 // <root>/webpack.config.js
let baseConfig = {
 // ....., 
 resolve:{ 
    plugins: [  new TsconfigPathsPlugin() ]
 }
}

in src/webpack.json.js there is another tsconfig.json that extends one in the root dir, and adds more paths
also there is another webpack.config.js that extends one in the root dir
the root webpack.config.js already uses the paths in it's corresponding tsconfig.json

does running webpack -c src/webpack.config.js adjusts this plugin to use paths in src/tsconfig.json or it uses the file in the root path and we need to add it again to the new config file?

and how to log the current used tsconfig and the final aliases?

@Nantris
Copy link

Nantris commented Sep 25, 2022

It seems like the aliases defined in Webpack still cannot be resolved by TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants