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]: Missing exports when using Rslib with Rspack 1.2.0-alpha.0 #633

Open
chenjiahan opened this issue Dec 31, 2024 · 2 comments · May be fixed by #630
Open

[Bug]: Missing exports when using Rslib with Rspack 1.2.0-alpha.0 #633

chenjiahan opened this issue Dec 31, 2024 · 2 comments · May be fixed by #630

Comments

@chenjiahan
Copy link
Member

Version

System:
    OS: macOS 14.6.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 2.71 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 131.0.6778.205
    Safari: 17.6
  npmPackages:
    @rslib/core: ^0.2.2 => 0.2.2

Details

Overrides Rspack to 1.2.0-alpha.0:

"pnpm": {
  "overrides": {
    "@rspack/core": "1.2.0-alpha.0"
  }
},

Then the rsbuild-plugin-rem is broken:

Image

The PLUGIN_REM_NAME variable is missing from the output bundle:

Image

Reproduce link

https://github.com/rspack-contrib/rsbuild-plugin-rem

Reproduce Steps

  1. clone repo
  2. git checkout rslib_repro_1231
  3. pnpm build
  4. pnpm test
@fi3ework fi3ework self-assigned this Dec 31, 2024
@fi3ework
Copy link
Member

fi3ework commented Dec 31, 2024

Yeah, it's because we lost optimization.avoidEntryIife which is disabled in 1.2.0-alpha.0 by default. @rslib/core has set the dependency of @rsbuild/core to @rsbuild/core": "~1.1.8 so it's safe for the future versions.

Rslib will add this configuration when @rsbuild/core 1.2.0 is released.

@chenjiahan
Copy link
Member Author

Get 👌

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

Successfully merging a pull request may close this issue.

2 participants