Skip to content

Webpack munges model names #24

@dupski

Description

@dupski

RevJS uses class (function) names to identify models as this makes typings nice to work with (enables DRY + refactoring).

However Webpack (UglifyJS) munges these model names.

There is a workaround which is to enable keep_fnames, but this results in increased bundle size so is not ideal.

We might be able to use keep_classnames. Not tried that. There is also a reserved option for uglify-es that we might be able to pass a list of model names to.

Failing that, we could resort to an additional, non-enumerated __name string property on models, which is a duplicate of the class name. Not pretty and not DRY though!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions