tsconfig-paths-webpack-plugin
tsconfig-paths-webpack-plugin copied to clipboard
alias exclude rules supported
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
})