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

[Bug]: Rslib build breaks shebang line in bin file #166

Open
chenjiahan opened this issue Sep 2, 2024 · 2 comments
Open

[Bug]: Rslib build breaks shebang line in bin file #166

chenjiahan opened this issue Sep 2, 2024 · 2 comments
Assignees
Labels
🐞 bug Something isn't working Rspack Rspack related issue

Comments

@chenjiahan
Copy link
Member

chenjiahan commented Sep 2, 2024

Version

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.72 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 128.0.6613.86
    Safari: 17.6
  npmPackages:
    @rslib/core: 0.0.4 => 0.0.4

Details

Rslib build breaks shebang line in bin file:

  • Input:

image

  • Output:

image

  • Failed to run:

image

Reproduce link

https://github.com/web-infra-dev/rsbuild/tree/8a2a850aad336b726e50b2b1bb203d8c72c1c48a/packages/create-rsbuild

Reproduce Steps

  1. pnpm i
  2. pnpm build
@chenjiahan chenjiahan changed the title [Bug]: Rslib build breaks bin file [Bug]: Rslib build breaks shebang line in bin file Sep 2, 2024
@fi3ework
Copy link
Member

fi3ework commented Sep 2, 2024

Shortly we could use https://github.com/shuangwhywhy/webpack-shebang-plugin. In longterm, we could considering making this a built-in plugin to webpack / Rspack.

@chenjiahan
Copy link
Member Author

Yes, we can add a built-in plugin to webpack and Rspack when the target is node.

@chenjiahan chenjiahan added 🐞 bug Something isn't working Rspack Rspack related issue labels Sep 2, 2024
@fi3ework fi3ework self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working Rspack Rspack related issue
Projects
None yet
Development

No branches or pull requests

2 participants