Skip to content

Hot reloading support ("PROVIDER_ALREADY_SETUP") #262

@adam-nielsen

Description

@adam-nielsen

Would it be possible to add a way to detect whether the Provider has already been set up?

I am using Vite with hot-reloading, and when I change my code, it reruns my init function, which causes the code to call Provider.setup() again. This throws an exception PROVIDER_ALREADY_SETUP.

There doesn't seem to be a way to query the Provider to see if it has already been set up. It would be great if I could do something like:

if (!provider.isSetup()) provider.setup()

This way I could skip the setup call when the code is hot reloaded and avoid the exception.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions