image icon indicating copy to clipboard operation
image copied to clipboard

fix(setup): Setup provider using the `provider` key

Open Tofandel opened this issue 1 year ago โ€ข 2 comments

๐Ÿ”— Linked issue

Fixes #1414

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation or readme)
  • [x] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality)
  • [ ] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Because the name is user provided and can (and should be different if we have multiple instances of one provider) then any name different than the provider name (eg: my-remote-ipx instead of ipx) will not setup the provider as expected

Tofandel avatar Aug 05 '24 12:08 Tofandel

Drafting this for now as there is some weird things going on with ipx

if (typeof p.setup === "function" && p.name !== "ipx" && p.name !== "ipxStatic") {
        await p.setup(p, options, nuxt);
}

Because we can't use nitro so early

Tofandel avatar Aug 06 '24 11:08 Tofandel

would you be able to add an example of the usage you have in mind, perhaps by adding it to the test fixture? ๐Ÿ™

danielroe avatar Aug 29 '24 09:08 danielroe