@kubb/plugin-fetch 5.0.0-beta.80 → 5.0.0-beta.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1479,6 +1479,7 @@ const pluginFetch = (0, _kubb_core.definePlugin)((options) => {
1479
1479
  ctx.setMacros([...defaultMacros, ...options.macros ?? []]);
1480
1480
  ctx.addGenerator(...selectedGenerators);
1481
1481
  const root = node_path.default.resolve(ctx.config.root, ctx.config.output.path);
1482
+ const baseURLExpression = baseURL ? baseURL.includes("${") ? `\`${baseURL.replaceAll("`", "\\`")}\`` : JSON.stringify(baseURL) : void 0;
1482
1483
  ctx.injectFile({
1483
1484
  baseName: "serializers.ts",
1484
1485
  path: node_path.default.resolve(root, ".kubb/serializers.ts"),
@@ -1488,7 +1489,7 @@ const pluginFetch = (0, _kubb_core.definePlugin)((options) => {
1488
1489
  baseName: "client.ts",
1489
1490
  path: node_path.default.resolve(root, ".kubb/client.ts"),
1490
1491
  copy: fetchClientTemplatePath,
1491
- footer: baseURL ? `client.setConfig({ baseURL: ${JSON.stringify(baseURL)} })` : void 0
1492
+ footer: baseURLExpression ? `client.setConfig({ baseURL: ${baseURLExpression} })` : void 0
1492
1493
  });
1493
1494
  ctx.injectFile({
1494
1495
  baseName: "standardSchema.ts",