0

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",
}
John Smith
  • 11
  • 1

0 Answers0