Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Hide api key in package.json

I would like to open source a project that I have been working on. Currently, my package.json contains a build config that lists an API key that I want to keep private. Can I access environment variables from package.json and reference the key that way, or is there a way to extract the build config to another file and access it from package.json? I have found plenty of questions referencing mutating environment variables from package.json but I haven't come across how to read them.

{
  "name": "name",
  "version": "0.7.1",
  "build": {
    "apikey": "asdfw345r34t...",
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!