Shopify / blockchain-components

Blockchain related React UI components for Shopify storefronts
https://blockchain.shopify.dev
MIT License
81 stars 18 forks source link

:bug: Set process.env.NODE_ENV value during compile #189

Closed QuintonC closed 1 year ago

QuintonC commented 1 year ago

ℹ️ What is the context for these changes?

Sets NODE_ENV value during compile time via tsup. This will prevent the connect-wallet package from adding the logging middleware in non-development environments and will also allow us to adjust the i18n configuration to make use of the process.env.NODE_ENV value for the debug configuration value (PR to follow).

🕹️ Demonstration

Demo screenshots were captured while running an example. This works because the examples make use of built packages rather than development packages.

Before After
Screenshot 2023-05-16 at 4 27 15 PM Screenshot 2023-05-16 at 4 25 59 PM

🎩 How can this be tophatted?

  1. Pull main.
  2. yarn install
  3. yarn example a. Run any example
  4. When the app launches you will see logging from the connect-wallet package.

Repeat the steps above, but instead of pulling main, pull this branch.

✅ Checklist