Skip to content

Load Pinia Setup Actions from external lib #2553

Discussion options

You must be logged in to vote

Hello, in the end I was able to load the setup actions through importmaps. In my case, I am working with a structure of microfrontends so each mfe should implement the same definition to get aligned.

Let's say I want to share the implementation of a Notification Service (common to all microfrontends):

1. From my lib I will export the actions setup as:


export interface NotificationState {
  message: string | null;
  type: 'success' | 'information' | 'warning' | 'error' | null;
  isOpen?: boolean | null;
  canClose?: boolean | null;
  duration?: number | null;
  actionText?: string | null;
  icon?: string | null;
}

export const initialState: NotificationState = {
  message: null,
  type: …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@francisco-alonso
Comment options

@nunoraposo33
Comment options

@francisco-alonso
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by francisco-alonso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants