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
After I build all of the shared packages, I go to build the electron app for production, but it fails with this:
⨯ /Users/notes-app/packages/database/.env must be under /Users/notes-app/apps/electron/ failedTask=build stackTrace=Error: /Users/notes-app/packages/database/.env must be under /Users/notes-app/apps/electron/
I am building the database package via rollup with this: "build": "rollup -c --bundleConfigAsCjs --environment INCLUDE_DEPS,BUILD:production",
I am building the electron app with this: "build:mac": "electron-vite build && electron-builder --mac",
How can I get this to work? Do I need to have a shared .env file at the root of the monorepo? Or do I need to build the database package a different way somehow that includes the env variables?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a monorepo created using yarn workspaces where I have this structure.
The electron app has the database package as a dependency. And the database package has its own
.env
file.After I build all of the shared packages, I go to build the electron app for production, but it fails with this:
I am building the database package via rollup with this:
"build": "rollup -c --bundleConfigAsCjs --environment INCLUDE_DEPS,BUILD:production",
I am building the electron app with this:
"build:mac": "electron-vite build && electron-builder --mac",
How can I get this to work? Do I need to have a shared
.env
file at the root of the monorepo? Or do I need to build the database package a different way somehow that includes the env variables?Beta Was this translation helpful? Give feedback.
All reactions