英文:
Extending Webpack - Is it cloud compatible?
问题
我在这里提出了这个问题:https://stackoverflow.com/questions/76388425/javascript-plugin-and-environment-variables
虽然解决方案在开发环境(自托管的Shopware)中完美运行,但我想知道它是否会在Shopware云环境中运行。在提交应用之前,我应该考虑什么?是否应该包括“dist”和“build”目录以及“.env”文件?
英文:
I asked this question here: https://stackoverflow.com/questions/76388425/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?
答案1
得分: 1
如果你想发布你的插件/应用程序,必须在存档中包含预编译的资产,放在dist
目录下。这不仅适用于云托管,而且适用于一般的所有生产环境,因为在生产服务器上不要求安装nodejs,所以不能指望用户编译你的源代码。无论如何,你应该包括所有的源代码(src
和build
目录以及在你的特定情况下.env
文件),以防他们在某个时候想重新编译这些资产。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论