Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Not seeing changes in app.config.js #1585

Closed
robbie-c opened this issue Feb 20, 2020 · 2 comments
Closed

Not seeing changes in app.config.js #1585

robbie-c opened this issue Feb 20, 2020 · 2 comments

Comments

@robbie-c
Copy link

robbie-c commented Feb 20, 2020

Description

Not seeing changes in app.config.js in Constants.manifest described here #1342 when running in web (also ExpoKit).

The function is definitely getting called as my console.log is being hit

Expected Behavior

Modified extra in app.config.js, expected to see those changes in Constants.manifest.extra

I've got an app.config.js of the following:

module.exports = function({ config }) {
  config.extra.foo = "app.config.js";
  console.log(config); // This is definitely being hit
  return config;
};

And my app.json has the following in it:

{
  "expo": {
    "sdkVersion": "36.0.0",
    "platforms": ["ios", "android", "web"],
    "isDetached": true,
    <snip/>
    "extra": {"foo": "app.json"}
  }
}

In the app:

import Constants from "expo-constants";
console.log(Constants.manifest.extra) // {foo: "app.json"} is printed, expected {foo: "app.config.js"}

Observed Behavior

Constants.manifest.extra is just what was in app.json

Environment

  Expo CLI 3.13.1 environment info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.3 LTS (Bionic Beaver)
      Shell: 4.4.20 - /bin/bash
    Binaries:
      Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
      Yarn: 1.21.1 - ~/.nvm/versions/node/v12.14.1/bin/yarn
      npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
    npmPackages:
      @types/react: ~16.9.0 => 16.9.21 
      @types/react-native: ~0.60.23 => 0.60.31 
      expo: ~36.0.0 => 36.0.2 
      react: ~16.9.0 => 16.9.0 
      react-native: ~0.61.4 => 0.61.5 

Reproducible Demo

https://github.com/robbie-c/AppConfigExample
Run yarn web

@EvanBacon
Copy link
Contributor

app.config.js is not supported yet. Basically any instance of readConfigJson[Async] in the repo needs to be replaced by getConfig

@robbie-c
Copy link
Author

I'll close then, looking forward to this making it into a release :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants