webpack is not mangling @effect/data/mjs/* properly
I investigated the bug I mentioned yesterday (starting a new thread for clarity)
When bundling my minimal
The stack trace points to
You can reproduce by cloning https://github.com/geoffreytools/effect-tree-shaking and running
Here is an extract from the file
Using
This assignment with a coma expression in a computed property is ugly, but it's valid JS so I would say it's a bug in webpack's terser. However, maybe whatever you are using to compile should not do this either
When bundling my minimal
divide app for production with webpack, the mangled output failed at runtime with a reference error _a is not defined.The stack trace points to
@effect/data/mjs/internal/Option.mjs:12:5You can reproduce by cloning https://github.com/geoffreytools/effect-tree-shaking and running
npm run build/webpack and npm run debugHere is an extract from the file
Using
[effectTypeId] directly in the constructor in the mjs output solved itThis assignment with a coma expression in a computed property is ugly, but it's valid JS so I would say it's a bug in webpack's terser. However, maybe whatever you are using to compile should not do this either
