matt-oakes / redux-devtools-expo-dev-plugin

The full Redux DevTools for Expo using a dev plugin
MIT License
51 stars 5 forks source link

possibly overriding environment variables? #6

Closed megantaylor closed 3 months ago

megantaylor commented 4 months ago

so excited and grateful for this plugin, thank you so much!

i installed and set up the plugin following the method described here: https://github.com/reduxjs/redux-devtools/issues/1533#issuecomment-2146390042 and it works!

however, i am now getting typescript errors about all of my environment variables. i poked around, and saw

declare global {
  const process: {
    env: {
      NODE_ENV: "development" | "production";
    };
  };
}

in src/index.ts.

looking at some other expo dev plugins (https://github.com/expo/dev-plugins), i notice that they don't do this, and assume the environment variables will be available via metro transform plugins.

so it seems to me as though that global declaration is overriding the env variables i have set up? am i totally off base? is there something i can do on my end to fix this?

matt-oakes commented 4 months ago

Hi there. Thanks for reporting this.

So I can look into this a bit easier, can you provide a minimal reproducable example of the issue? A Github repo with an Expo app which does nothing but show this issue would be perfect.

zakwalters commented 4 months ago

Forgot to check the issues before opening, but #7 has a fix for this.

matt-oakes commented 3 months ago

Fixed in v0.2.0. Thank you for reporting this.