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

123
Views
How to Make Webpack Produce a JS file as-is to Use it Later for Configuration

I have a custom config JS file used to specify the REST API entry points, I need that file available in dist folder after npm run build:prod without bundling/minimization so I can edit it later in production

I tried

{
        test: /\.(js|jsx)$/,
        exclude: [
          /\bcore-js\b/,
          /\bwebpack\/buildin\b/,
          /apicalls.js$/
        ],
}

But it totally excluded it from the bundle

How can I achieve this ?

apicalls.js

 const APIURL= "https://localhost:12500/api/";
export default {

    // get all criteria in DB
    getAllCriterias: APIURL + "Criteria/getAll",
    
    //get current website user
    user: APIURL + "UserIdentity/user",
}
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!