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

dts for entries exposed with aliases are not emitting #2671

Closed
5 tasks done
smelukov opened this issue Jun 26, 2024 · 2 comments
Closed
5 tasks done

dts for entries exposed with aliases are not emitting #2671

smelukov opened this issue Jun 26, 2024 · 2 comments

Comments

@smelukov
Copy link

Describe the bug

DTS for exposed entries does not emit If we're using an alias in there entries

import * as path from "node:path";
import {ModuleFederationPlugin} from "@module-federation/enhanced";

export default {
    resolve: {
        alias: {
            foo: path.resolve(__dirname, 'src/sub/foo') // here is an alias for foo
        }
    },
    plugins: [
        new ModuleFederationPlugin({
            exposes: {
                './foo': 'foo', // ❌ not working (no dts created for src/sub/foo), even if it's an existing alias
                // './foo': './src/sub/foo', // ✅ works fine
                './bar': './src/bar'
            },
        })
    ]
}

Reproduction

https://github.com/smelukov/mf-dts-alias-bug/blob/main/webpack.config.ts#L16

Used Package Manager

npm

System Info

...

Validations

@ScriptedAlchemy
Copy link
Member

Alias is not analyzed. DTS does not use webpack resolvers to extract types. Its just tsc, not actually part of the compile AFIK

@2heal1 is it possible to support resolve alias in dts extraction?

Copy link
Contributor

Stale issue message

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants