Skip to content

[inversify-express-utils] HMR issue #433

Open
@Diukas

Description

@Diukas

Hey, I'm experiencing issues with inversify-express-utils library, when application is running with HMR enabled and you make changes to controllers the application crashes because of duplicate Reflect metadata.

Expected Behavior

When application is reloaded through HMR the constructor should remove previous Reflect metadata and add new one.

Current Behavior

Making change to controller with HMR enabled duplicates Reflect metadata and checks for unique controller fails.

Possible Solution

Add de-duplication logic in decorators.ts

image

Steps to Reproduce (for bugs)

  1. Add controller class
  2. Launch application with HMR enabled
  3. Make changes to controller class

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions