text: require('dotenv').config();
  const mustacheExpress = require('mustache-express');
  var path = require('path');
  
  const configureDevServer = (decoratorFragments) => ({
      before: (app) => {
          app.engine('html', mustacheExpress());
          app.set('views', `${__dirname}/../../../dist/dev`);
          app.set('view engine', 'mustache');
          app.get(['/dist/settings.js'], (_req, res) => {
              res.set('content-type', 'application/javascript');
              res.send(`window.appSettings = {
                  APP_VERSION: '${process.env.APP_VERSION}',
                  REST_API_URL: '${process.env.FORELDREPENGESOKNAD_API_URL}',
                  UTTAK_API_URL: '${process.env.FP_UTTAK_SERVICE_URL}',
                  LOGIN_URL: '${process.env.LOGINSERVICE_URL}',
                  FAMILIE: '${process.env.FAMILIE}',
                  FEATURE_VIS_PERIODER_SOM_SENDES_INN:  '${process.env.FEATURE_VIS_PERIODER_SOM_SENDES_INN}',
                  FEATURE_VIS_FEILSIDE:  '${process.env.FEATURE_VIS_FEILSIDE}',
                  FEATURE_VIS_ALERTSTRIPE:  '${process.env.FEATURE_VIS_ALERTSTRIPE}',
              };`);
          });
          app.get(/^\/(?!.*dist).*$/, (_req, res) => {
              res.render('index.html', Object.assign(decoratorFragments));
          });
      },
      watchContentBase: false,
      liveReload: false,
      hot: true,
      quiet: false,
      noInfo: false,
      stats: 'minimal',
      publicPath: '/dist',
  });
  
  module.exports = configureDevServer;
  