Skip to content

@vue-storefront/middleware@4.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 02 Jul 12:14
· 114 commits to main since this release
c5068dd

Minor Changes

  • [ADDED] Provided easy access to methods added by middleware extensions via the context.extendedApi property.
const extensionA = {
  name: 'extensionA',
  extendApiMethods: {
    methodA: async () => { ... }
  }
}

const extensionB = {
  name: 'extensionB',
  extendApiMethods: {
    methodB: async () => { ... }
  }
}

const extensionC = {
  name: 'extensionC',
  extendApiMethods: {
    methodC: async (context) => {
      context.extendedApi.methodA();
      context.extendedApi.extensionB.methodB();
    }
  }
}