Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Aug 27, 2020 09:07 PM
Basically I want to know if the current env is an installed custom block or a local development environment?
Reply
2 Replies 2
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Sep 08, 2020 11:44 AM
Hey @Ashwin_P
You can use process.env.NODE_ENV
to check the environment. The value will be set to development
during local development (block run
), and production
for released blocks.
Comment Post Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Sep 08, 2020 12:40 PM
That’s great, Thank you.