How to support umd format export default ? #1071
-
![]() it will be appear "TypeError: default is not a constructor" when use export default way on build script "dist". I found the webpack issue webpack/webpack#8480 . it suggest use 'output.libraryExport: "default" 'config but it alse no work in Rslib minimal repo on here https://github.com/watsonhaw5566/rslib-umd-repo |
Beta Was this translation helpful? Give feedback.
Answered by
Timeless0911
Jun 18, 2025
Replies: 1 comment 1 reply
-
See https://rspack.rs/config/output#outputlibraryexport. export default defineConfig({
// ...
tools: {
rspack: {
output: {
library: {
export: 'default',
},
},
},
},
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fi3ework
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://rspack.rs/config/output#outputlibraryexport.