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

classBasedClassifierDeducerFor doesn't work with bundlers/minifiers #143

Closed
alessiostalla opened this issue Mar 12, 2024 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@alessiostalla
Copy link
Contributor

alessiostalla commented Mar 12, 2024

classBasedClassifierDeducerFor uses the constructor.name property that bundlers and minifiers will potentially change. I managed to break it just by importing an unrelated "Property" function; the bundler decided to rename Lionweb's Property class to Property2, thus making it impossible to deserialize any language.

In Tylasu we solved this with an optional property one can add to classes to fix their name, and a decorator that makes setting the property easier. Something like:

@Classifier("Property")
export class Property {
  ...
}
@dslmeinte
Copy link
Contributor

The easiest way to fix this is probably to add a field metaType to the abstract class M3Node and populate that with the correct string.

@dslmeinte
Copy link
Contributor

See PR #146

@dslmeinte
Copy link
Contributor

Fixed by PR #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants