main.jsfile. It has to be placed into a
<plugin root>/src/Resources/app/administration/srcdirectory in order to be found by Shopware 6.
pagefor your plugin's custom route, or is this going to be a component to be used by several other components, such as an element that prints 'Hello world' everywhere it's used? In order to properly structure your plugin's code and to be similar to the core structure, you have to answer this question first. If it's going to be used as page for a module, it should be placed here:
<plugin-root>/src/Resources/app/administration/src/module/<your module's name>/page/<your component name>
<plugin-root>/src/Resources/app/administration/app/src/component/<name of your plugin>/<name of your component>
index.js. We will get you covered with more information about it later. Now import your custom component using your plugin's
index.jsfile, this one will be the most important for your component.
ComponentFactory, which is available throughout our third party wrapper. This
Componentobject provides a method
register, which expects a name and a configuration for your component.
templateproperty. For this short example, the template will be defined inline. An example for a bigger template will also be provided later on this page.
<hello-world></hello-world>in any other template in the Administration.