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.

本文标签: