Skip to content

existing aliasesΒ #84

@its-dibo

Description

@its-dibo
  • 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions