Extending a storefront javascript class from a non Shopware plugin class

Viewed 130

How can I import a javascript class from a Shopware plugin so i can extend the class? For Shopware javascript classes the files are located under src (for example import Plugin from 'src/plugin-system/plugin.class'; but 3rd party plugins aren’t located there afaik.

import Class from 'myplugin/component/path/plugin';

export default class MyClass extends Class {

}

Current way of import is as follows but that should be accomplished cleaner.

import MyClass from '../../../../../../../../../vendor/store.shopware.com/myplugin/src/Resources/app/storefront/src/component/*********/**********.******';
0 Answers
Related