risen228 / craco-alias

A craco plugin for automatic aliases generation for Webpack and Jest
MIT License
109 stars 11 forks source link

Support `@*` #40

Open lihz6 opened 2 years ago

lihz6 commented 2 years ago

This config didn't works, but it should:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@*": ["./src/*"]
    }
  }
}
risen228 commented 2 years ago

This config didn't works, but it should:


{

  "compilerOptions": {

    "baseUrl": ".",

    "paths": {

      "@*": ["./src/*"]

    }

  }

}
{
  "@/*": ["./src/*"]
}
lihz6 commented 2 years ago

This config didn't works, but it should:

{

  "compilerOptions": {

    "baseUrl": ".",

    "paths": {

      "@*": ["./src/*"]

    }

  }

}
{
  "@/*": ["./src/*"]
}

The / in the middle might be a little unpleasant. And tsc is able to resolve @*.