Skip to content

@vue-storefront/[email protected]

Compare
Choose a tag to compare
@github-actions github-actions released this 06 Jun 14:18
· 73 commits to main since this release
2a3a774

Minor Changes

// middleware.config.ts
const middlewareExtension = {
  name: "example-extension",
  hooks: () => ({
    beforeCreate: async ({ configuration }) => Promise.resolve(configuration),
    afterCreate: async ({ configuration }) => Promise.resolve(configuration),
    beforeCall: async ({ args }) => Promise.resolve(args),
    afterCall: async ({ response }) => Promise.resolve(response),
  }),
};
// index.server.ts
import { apiClientFactory } from "@vue-storefront/middleware";

const { createApiClient } = apiClientFactory({
  onCreate: async (config) =>
    Promise.resolve({
      config,
      client: {},
    }),
  api: {},
});

export { createApiClient };