Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose build info to beforeDevCommand and beforeBuildCommand #2610

Closed
JonasKruckenberg opened this issue Sep 15, 2021 · 0 comments
Closed

Expose build info to beforeDevCommand and beforeBuildCommand #2610

JonasKruckenberg opened this issue Sep 15, 2021 · 0 comments
Labels
scope: api.js The @tauri-apps/api npm package

Comments

@JonasKruckenberg
Copy link
Member

Is your feature request related to a problem? Please describe.
The os and app APIs already provide a way to retrieve information about the app such as arch, platform and type.
I'd like to use the Vite env var feature to only include platform specific code on that platform.

Describe the solution you'd like
As the properties mentioned above are statically set anyway, we can also expose them as environment variables during build right?

Describe alternatives you've considered
Some properties can be sourced from different locations to provide a similar behavior (taking the OS from GitHub actions env vars for example) but I've yet to find a way to access the arch.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: api.js The @tauri-apps/api npm package
Projects
None yet
Development

No branches or pull requests

1 participant