-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support for references #44
Comments
Sounds good! Fancy submitting a PR? |
I tried to find some time to do it but unfortunately no luck so far :( |
ts-loader has support for references: const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
module.exports = {
entry: './src/index.ts',
mode: 'development',
output: {
filename: 'bundle.js',
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [new TsconfigPathsPlugin()],
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
options: { projectReferences: true },
},
],
},
} |
When webpack resolves modules, it should use the paths from these TS projects but only for the modules which belong to the project they're defined for. To illustrate this, here's an example: Project "paths": {
"helpers/*": ["./my-helpers/*"]
} Project "paths": {
"components/*": ["./my-components/*"]
} The |
Here is a reduced test case to demonstrate the problem: https://github.com/OliverJAsh/tsconfig-paths-project-references-bug The paths inside the referenced project |
It seems like this plugin doesn't support paths defined in references, so I'm suggesting adding this feature to the plugin.
The text was updated successfully, but these errors were encountered: