You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not really familiar with this import.meta stuff, but importing jotai leads to the following warnings:
▲ [WARNING] "import.meta" is not available in the configured target environment ("chrome58", "edge18", "firefox57", "safari11") and will be empty
../node_modules/jotai/esm/index.mjs:66:7:
66 │ if ((import.meta.env && import.meta.env.MODE) !== "production") {
╵ ~~~~~~~~~~~
▲ [WARNING] "import.meta" is not available in the configured target environment ("chrome58", "edge18", "firefox57", "safari11") and will be empty
../node_modules/jotai/esm/index.mjs:66:26:
66 │ if ((import.meta.env && import.meta.env.MODE) !== "production") {
╵ ~~~~~~~~~~~
The code only checks the existence of import.meta.env so i guess import.meta should always exist. It seems to work with other bundlers (webpack).
The text was updated successfully, but these errors were encountered:
import.meta.env is not in the scope of esbuild, you will have to add your own --define:import.meta.env={}. The jotai package makes the assumption that their users are using webpack. But other bundlers (including rollup) do not agree with that.
If there exists one common env variable, it has to be process.env.NODE_ENV. But someone also wants to remove that. So I guess there's no perfect solution.
I am not really familiar with this
import.meta
stuff, but importing jotai leads to the following warnings:The code only checks the existence of
import.meta.env
so i guessimport.meta
should always exist. It seems to work with other bundlers (webpack).The text was updated successfully, but these errors were encountered: