Skip to main content

createPowerSyncPlugin()

function createPowerSyncPlugin(powerSyncPluginOptions): {
install: (app) => void;
};

Create a Vue plugin to define the PowerSync client. Client will be provided app-wide (highest position in component hierarchy).

Needs to be installed on a Vue instance using app.use().

Parameters

ParameterType
powerSyncPluginOptions{ database: MaybeRef<CommonPowerSyncDatabase>; }
powerSyncPluginOptions.databaseMaybeRef<CommonPowerSyncDatabase>

Returns

{
install: (app) => void;
}
NameType
install()(app) => void