pmndrs / jotai

👻 Primitive and flexible state management for React

Home Page:https://jotai.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack support

ayroblu opened this issue · comments

Summary

Hi, I noticed that window.__NUMBER_OF_JOTAI_INSTANCES__ was injected into our console. From a look at the details, I'm guessing that this is a vite thing where they inject an environment variable. However we use webpack that doesn't have this automatically happen. Is there a way to handle the traditional webpack case (where it would typically use process.env.NODE_ENV === 'production')

Link to reproduction

N/A