// TODO abstract from server const path = require('path'); const nconf = require('nconf'); const setupNconf = require('../../website/server/libs/setupNconf'); let configFile = path.join(path.resolve(__dirname, '../../config.json')); setupNconf(configFile); const DEV_BASE_URL = nconf.get('BASE_URL'); module.exports = { chainWebpack: config => { const pugRule = config.module.rule('pug') // clear all existing loaders. // if you don't do this, the loader below will be appended to // existing loaders of the rule. pugRule.uses.clear() // add replacement loader(s) pugRule .test(/\.pug$/) // this applies to