Search code examples
shopware6shopware6-app

Extending Webpack - Is it cloud compatible?


I asked this question here: Javascript plugin and environment variables

While the solution is perfectly working in a dev (self-hosted Shopware) environment I would like to know if it will be working in the Shopware cloud environment. What should I consider when archiving the app before submission? Should the "dist" and "build" directories and the ".env" file be included?


Solution

  • If you want to publish your plugin/app, you must include the pre-compiled assets within the dist directory in the archive. This is not only required for cloud hosted but for all production environments in general, as nodejs is not a requirement on production servers, so you can't expect the users to compile your sources. You should include all of your sources (src and build directory and in your specific case the .env file) nonetheless, just in case they do want to re-compile the assets at some point.