(Shopware 6) 使用带有 js 文件的插件的热代理

(Shopware 6) Using hot-proxy with a plugin with js files

当我尝试使用 ./psh.phar storefront: hot-proxy 或 ./psh.phar storefront: hot。我在控制台中出现此错误

(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.

当我从插件中删除 main.js 时,问题没有发生。如何在插件中使用js文件?

如果您从任何 theme.json 文件调用此特定包,请将其删除。