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

alias exclude rules supported #53

Open
gogoyqj opened this issue Sep 29, 2020 · 1 comment
Open

alias exclude rules supported #53

gogoyqj opened this issue Sep 29, 2020 · 1 comment

Comments

@gogoyqj
Copy link

gogoyqj commented Sep 29, 2020

i'm using with bit, project structure is:

boilerplate
├── components/home/sfc-avatar
|  ├── SFCAvatar.tsx
|  └── node_modules/@components/IconFont
├── src/components/IconFont
└── tsconfig.json

tsconfig.json:

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

webpack config:

    {
      resolve: {
        plugins: [new TsconfigPathsPlugin({})]
      }
    }

then if import SFCAvatar.tsx, components/home/sfc-avatar/node_modules/@components/IconFont is supposed to be resolved, but actually src/components/IconFont is resolved

can there is a exclude option supported just like(or i'd like to make a pr):

new TsconfigPathsPlugin({
  exclude: RegExp // test request.path
  exclude: (request) => boolean
})
@BanShan-Alec
Copy link

same issue

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