Skip to content

Error using aliases : compilerOptions.paths must not be set (aliased imports are not supported) #10882

Open
@evskorobogatij

Description

@evskorobogatij

Hi!

i create that on ts with cra
I what to use typescript aliases in project
To to that I create tsconfig.paths.json

{
    "compilerOptions": {
        "baseUrl": "src",
        "paths": {
          "@components/*" : ["components/*"]
        }
    }
}

And import it in tsconfig.json:

{
  "extends": "./tsconfig.paths.json",
....
}

Then i install tsconfig-paths-webpack-plugin
And create webpack.config.js

const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {

    resolve: {
        plugins: [new TsconfigPathsPlugin({/* options: see below */ })]
    }
}

But on yarn start i got an error

  - compilerOptions.paths must not be set (aliased imports are not supported)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions