jaredpalmer / jaredpalmer/backpack

Documention on how to change environment.

Open
#164 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.4k
Forks
164
PR merge metrics
No merged PRs in 30d

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

Contributor guide

Open the contributing guide

Research direction

Review the existing documentation and the webpack/backpack.config references mentioned in the issue, then trace how .env and NODE_ENV are handled during asset builds. Document the supported way to select an environment for monitoring, S3, and other configuration, with a reproducible build example as the completion check.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, webpack
Domain
build-system, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.