Skip to content

Documention on how to change environment. #164

@george-norris-salesforce

Description

Thanks for this awesome library! Have a question about changing environment variables.

I've been looking though the issues, and there are several closed issues asking how to change the environment var when building assets. As far as I can tell, there is no answer yet. Is possible for this project to document how this is accomplished?

For our project, we really need to change the environment for setting up monitoring, S3 configs and other configuration based on environment. We haven't able to do this using backpack so far. We've tried changing the NODE_ENV in .env (using dotEnv), changing the mode in the backpack.config, etc.

Anyways, if this is possible.. would be excellant if there could be some sort of documention on how this in done. Thanks!


in .env
NODE_ENV=production
// run in development

module.exports = {
  webpack: (config) => {
    config.mode = 'production';
 ....

// run in development

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions