Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

125
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda