config fixes

This commit is contained in:
Matteo Pagliazzi
2019-10-01 16:23:09 +02:00
parent b466d12263
commit 33b26a69b8
12 changed files with 461 additions and 620 deletions

View File

@@ -10,6 +10,26 @@ 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 <template lang="pug"> in Vue components
.oneOf('vue-loader')
.resourceQuery(/^\?vue/)
.use('pug-plain')
.loader('pug-plain-loader')
.end()
.end()
},
devServer: {
proxy: {
// proxy all requests to the server at IP:PORT as specified in the top-level config