Set platform npm environment variable
See original GitHub issue- Version: 10.8.1
- Target: all
prebuild
now fully supports Electron and works great together with electron-builder
and the npmSkipBuildFromSource
option.
Additionally it would be great if electron-builder
could expose the platform it builds for to a npm
environment variable (npm_config_platform
) during the rebuilding of native modules.
This way prebuild
would be able to download the correct prebuilt binary for the desired target.
This would make multi platform builds with native dependencies possible.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to set environment variables in a cross-platform way?
Is there a way to declare environment variables in a way that is consistent and cross-platform? javascript · node.js · npm · Share....
Read more >config | npm Docs
Any environment variables that start with npm_config_ will be interpreted as a configuration parameter. For example, putting npm_config_foo=bar in your ...
Read more >Working with Environment Variables in Node.js - Twilio
Environment variables are a great way to configure parts of your Node.js application. Learn how to work with them using helpful tools such ......
Read more >Setting up environment variables in Node.js ... - GeeksforGeeks
Setting up environment variables in Node.js in a platform independent way · Step 1: Install · Step 2: · Step 3: Require dotenv...
Read more >Environment variables - cross-platform-node-guide - GitHub
Outside Node.js (e.g. in npm scripts), environment variables should be referenced and passed using cross-env . Use os methods ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be implemented soon.
@lgeiger I actually added support for this on my own branch but never PR’d it because it was a bit hacky.
https://github.com/mmckegg/electron-builder/commit/e0936afe3701f6507a2856ea7ee4421e5c0a2af9