最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Shopware administration module not showing up after administration:build - Stack Overflow

programmeradmin1浏览0评论

I'm building a Shopware plugin with part storefront and part administration. The storefront part is working fine, but I can't get the administration part to show up in the menu on the admin page with the administration:build mand.

I followed the Shopware Docs and the Shopware course on how to do this. I matched them both but still no success. Might there be something I'm missing here?

This is the main.js file where I import the plugin folder.

import './module/configurator';

This is the index.js file in the plugin folder where I register my plugin

import './page/configurator-ponent-list';
import './page/configurator-ponent-detail';
import './page/configurator-ponent-create';

Shopware.Module.register('configurator', {
    type: 'plugin',
    name: 'Configurator',
    color: '#ff3d58',
    icon: 'default-shopping-paper-bag-product',
    title: 'Configurator',
    description: 'Module for registering ponents',

    routes: {
        index: {
            ponent: 'configurator-ponent-list',
            path: 'index'
        },
        detail: {
            ponent: 'configurator-ponent-detail',
            path: 'detail/:id',
            meta: {
                parentPath: 'configurator.index'
            }
        },
        create: {
            ponent: 'configurator-ponent-create',
            path: 'create',
            meta: {
                parentPath: 'configurator.index'
            }
        }
    },

    navigation: [{
        label: 'Configurator',
        color: '#ff3d58',
        path: 'configurator.index',
        icon: 'default-shopping-paper-bag-product',
        parent: 'sw-catalogue',
        position: 100
    }],
});

And just in case there might be something wrong with my file tree, here it is

- administration
  - src
    - module
      - configurator
        - page (includes the different ponents of the plugin)
        - index.js
    - main.js
- storefront
  - src

Output of administration:build

Starting Execution of 'administration:build' ('/var/www/html/dev-ops/administration/actions/build.sh')


(1/3) Starting
> bin/console bundle:dump
    Cannot load Xdebug - it was already loaded
    
     [OK] Dumped plugin configuration.                                              
    
    
(2/3) Starting
> PROJECT_ROOT=/var/www/html ENV_FILE=/var/www/html/.env npm run --prefix vendor/shopware/platform/src/Administration/Resources/app/administration/ build
    
    > [email protected] build /var/www/html/vendor/shopware/platform/src/Administration/Resources/app/administration
    > mode=production webpack
    
    # Compiling with Webpack configuration
    # Production mode is activated 
发布评论

评论列表(0)

  1. 暂无评论