首页 > 解决方案 > (Shopware 6) Using hot-proxy with a plugin with js files

问题描述

When I try to use ./psh.phar storefront: hot-proxy or ./psh.phar storefront: hot. I have this error in the console

(node: 1078) UnhandledPromiseRejectionWarning: WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.entry ['storefront'] should not contain the item '/app/custom/plugins/MyCustomPlugin/src/Resources/app/storefront/src/main.js' twice.

When I remove main.js from the plugin the problem does not occur. How can I use js files in plugins?

标签: shopware

解决方案


If you are calling this specific bundle from any theme.json file, remove that.


推荐阅读