process.env.NODE_ENV !== "production" statements in output makes it incompatible in browser
#2609
Replies: 2 comments 1 reply
-
|
I've checked both the src and dist folders, and cannot find any reference to Not sure where that code is coming from. Perhaps it's injected by the build process on your end? |
Beta Was this translation helpful? Give feedback.
-
|
@segunadebayo Thanks for the help, after more debugging, it looks like it comes from Zag (https://github.com/chakra-ui/zag/blob/266039c266265a3868d35f46d2564ea954cfe12c/packages/store/src/proxy.ts#L6) Here is the full bundled file (not minified), if that can provide more context: https://gist.github.com/baptisteArno/dc45ea3aa0bdde8b405acc0cebe1eb57 Should I open an issue on zag repo then? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When I bundle a package that imports
@ark-ui/solidwith the following Rollup config:The produced
web.jsfile containsprocess.env.NODE_ENV !== "production"statements that come directly from the dist files from ark solid package.When importing that file as a module in a browser, it will say "process is not defined"
Link to Reproduction (or Detailed Explanation)
https://github.com/baptisteArno/typebot.io
Steps to Reproduce
packages/embeds/jspnpm run buildArk UI Version
3.3.0
Framework
Browser
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions