How to write my own theia plugin api

hello, I want write enhance theia plugin api. how can I do it?

i made one
the backend plugin api worked. but the frontend plugin api failed.

this is the error in my chrome:

it seems cannot find the webwoker file. here is my api-provider file.

import { injectable } from 'inversify';
import { ExtPluginApiProvider, ExtPluginApi  } from '@theia/plugin-ext/lib/common/plugin-ext-api-contribution';
import * as path from 'path';

@injectable()
export class MusicPluginApiProvider implements ExtPluginApiProvider {
    provideApi(): ExtPluginApi {
        return {
            frontendExtApi: {
                initPath: '../../lib/plugin/webworker/music-api-worker-provider.js',
                initFunction: 'initializeApi',
                initVariable: 'music_api_provider'
            },
            backendInitPath: path.join('@music/theia-plugin-ext/lib/plugin/node/music-api-node-provider.js')
        };
    }
}

how can i change the initPath so that my new api can work in frontend