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]: Default export of library is undefined in final build #8045

Open
natocTo opened this issue Oct 2, 2024 · 0 comments · May be fixed by #8046
Open

[Bug]: Default export of library is undefined in final build #8045

natocTo opened this issue Oct 2, 2024 · 0 comments · May be fixed by #8046
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.

Comments

@natocTo
Copy link

natocTo commented Oct 2, 2024

System Info

System:
- OS: macOS 14.5
- CPU: (11) arm64 Apple M3 Pro
- Memory: 1.26 GB / 18.00 GB
- Shell: 5.9 - /bin/zsh

Binaries:
- Node: 20.15.1 - /opt/homebrew/bin/node
- Yarn: 1.22.22 - ~/Documents/GitHub/ui/node_modules/.bin/yarn
- npm: 10.2.3 - ~/Documents/GitHub/ui/node_modules/.bin/npm

Browsers:
- Chrome: 129.0.6668.89
- Safari: 17.5

Details

I am migration one library from Webpack do Rspack. Locally (dev) working great, I have a issue with final production build.

Related config:

library: { name: 'kbcApp', export: 'default', type: 'window' },

Related default library export:

export default {
  start: startApp,
  helpers,
};

Check final export from compilted files:
Image

There is "collision" in names - Z and default. I am not sure why it is Z in the object, but it is not reflected bellow.
The s.default return undefined, when I override it to s.Z it works as expected.

Am I doing something wrong?

Reproduce link

No response

Reproduce Steps

  1. build library with default export
  2. check final build if library is correctly assigned
@natocTo natocTo added bug Something isn't working pending triage The issue/PR is currently untouched. labels Oct 2, 2024
@inottn inottn linked a pull request Oct 3, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending triage The issue/PR is currently untouched.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant