Closed yarapolana closed 1 year ago
Hi @yarapolana,
There is a workaround to define process in Remix code, You can use that temporarily, Soon we will add support for Remix directly in the library itself,
To define process you can create an inline script with following code.
<script
dangerouslySetInnerHTML={{
__html: `window.process = ${JSON.stringify({
env: {},
})}`,
}}
/>
You can also find more information here https://github.com/remix-run/remix/discussions/4906 https://sergiodxa.com/articles/use-process-env-client-side-with-remix
@sushinpv Wow, thank you for the fast reply. Didn't see this until now. Works like a charm!
The only thing I changed was ... JSON.stringify(env)
instead of ... JSON.stringify({ env: ... })
I am using Remix and haven't found a workaround to solve
process not defined
, in the other resolved issues, you mentioned webpack and prefixes from vite, next, and react, which don't work in my case.Is there a workaround? A custom config option somewhere? Thanks in advance