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

Cannot use files with multiple dots in their names in remote exposes #2957

Closed
5 tasks done
artieeez opened this issue Sep 16, 2024 · 2 comments
Closed
5 tasks done

Cannot use files with multiple dots in their names in remote exposes #2957

artieeez opened this issue Sep 16, 2024 · 2 comments

Comments

@artieeez
Copy link
Contributor

Describe the bug

When using files that contain two dots in their filenames (e.g., bar.component.tsx) in the exposes configuration, the remote module is ignored. This results in the exposed module not being included in the generated declarations and failing to work in the consumer when imported.

exposes: { './foo': './src/components/foo.tsx', './bar': './src/components/bar.component.tsx' }

In this scenario:

  • ./bar will not be included in the generated declarations.
  • It will not work in the consumer if imported.

There are no errors thrown in the producer during the build process. However, you can confirm the issue by:

  • Checking the missing declaration in the dist folder.
  • Trying to import the remote in a consumer, which will result in an error.

Reproduction

https://github.com/artieeez/rsbuild-module-federation-issue

Used Package Manager

npm

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 10.34 GB / 19.83 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)

Validations

@artieeez artieeez changed the title Cannot use files with two dots in their names in remote exposes Cannot use files with multiple dots in their names in remote exposes Sep 16, 2024
@artieeez
Copy link
Contributor Author

artieeez commented Sep 17, 2024

The issue began after the release of version v0.2.7.

@artieeez
Copy link
Contributor Author

Found the issue. I'll open a PR

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

1 participant