Skip to content

Add option to skip code injection for import.meta.hot #15

Description

@LFrobeen

Hi there!

Many thanks for publishing and maintaining this amazing package.

I’m currently working on an internal tool that requires HMR and also strongly depends on exact source maps for static code analysis. I appreciate that the current implementation already tries to minimize the impact on source maps by minifying the injected code down to a single line, but unfortunately this still breaks source maps in my situation.

I can work around this for now, but I was wondering whether it would be possible to add an option to skip the code injection entirely until full source map handling is implemented.

I understand this would make import.meta.hot unavailable in imported modules, but if I’m not mistaken, it should be possible to work around that by importing the required values directly from the hot-hook package.

I doubt many people have the same use case, so I completely understand if this feature request is dismissed. In any case, I’d love to hear your thoughts on this.

Looking forward to your reply, and thanks again for your excellent work on this package!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions