-
Notifications
You must be signed in to change notification settings - Fork 9
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
Issues with js-minifier? #23
Comments
I'm working on a possible solution (see the className branch). |
Is there an update on this issue? I potentially have a similar bug where I expected handler X to be called, but instead handler Y was executed. I can't reproduce it in development, but it does occur in production. |
I publish a beta version 1.3.0-beta.1 where you can specify a name for the className. |
Thanks. It seems to be working. I'm not sure how to verify this, except that after minification, I can no longer reproduce the errors that I was having. Is there an implicit way to implement this without having to explicitly define the unique ID in both the decorator and the request class? |
I'm open to suggestions ;-) |
The v2 mediatr-ts have been released, there were breaking changes (interfaces and class has been renamed) see the README. The code for add/get the request/notification was changed (code from beta1 was NOT ported), give it a try and send feedback about the issue. If the problem persist you can try to remove className from minification. module.exports = {
mode: ...,
resolve: ...,
target: ...,
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
},
}),
],
},
}; see this StackOverflow post |
Since you're using class name as key, it can get pretty messed up going through a JS minifier, am I right? I got a case where in dev it goes ok, then I published it for production and it got an errors where two handler classes ended up having the same name.
The text was updated successfully, but these errors were encountered: