admin管理员组文章数量:1122846
I stumbled upon an issue while determining the actual environment of the Webpack project I'm working on.
When the project gets deployed to a testing or production environment, a different file path is needed for the compiled JavaScript files and assets, than when I work locally.
A simple fix: changing the path locally, but not committing the change.
However, what I'm looking for is a way to commit a solution that works in all environments.
Unfortunately, retrieving the Webpack environment parameter is not the right solution because I also need to run a production build locally.
What generic solution can I implement in my render.js to resolve this issue?
What I already tried is conditioning the file path with the environment parameter of the Webpack command. But this is not the correct solution as mentioned earlier.
本文标签:
版权声明:本文标题:javascript - How to determine machine environment when running a Webpack command with a given environment parameter? - Stack Ove 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736302932a1931707.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论