Skip to content

Commit 9d3f279

Browse files
committed
Updated webpack loader config
1 parent 1494627 commit 9d3f279

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

frontend/vue.config.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,25 @@ module.exports = {
77
: 'http://localhost:8080/',
88
outputDir: '../modoboa_contacts/static/',
99
assetsDir: 'modoboa_contacts',
10-
devServer: {
11-
publicPath: 'http://localhost:8080/',
12-
headers: {
13-
'Access-Control-Allow-Origin': '*',
14-
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
15-
'Access-Control-Allow-Headers':
16-
'X-Requested-With, content-type, Authorization',
17-
'Access-Control-Allow-Credentials': 'true'
18-
}
19-
},
20-
configureWebpack: config => {
21-
config.plugins.push(new BundleTracker({
22-
path: '../modoboa_contacts/static/modoboa_contacts/'
23-
}));
10+
chainWebpack: config => {
11+
config
12+
.plugin('BundleTracker')
13+
.use(BundleTracker, [{
14+
filename: path.join('../modoboa_contacts/static/modoboa_contacts/', 'webpack-stats.json')
15+
}])
16+
17+
config.devServer
18+
.public('http://localhost:8080')
19+
.port(8080)
20+
.hotOnly(true)
21+
.watchOptions({poll: 1000})
22+
.https(false)
23+
.headers({
24+
'Access-Control-Allow-Origin': '*',
25+
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
26+
'Access-Control-Allow-Headers':
27+
'X-Requested-With, content-type, Authorization',
28+
'Access-Control-Allow-Credentials': 'true'
29+
})
2430
}
2531
}

modoboa_contacts/templates/modoboa_contacts/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
};
2020
</script>
2121
{% endif %}
22-
{% render_bundle 'chunk-vendors' 'js' 'CONTACTS' %}
2322
{% render_bundle 'app' 'js' 'CONTACTS' %}
2423
{% endblock %}
2524

0 commit comments

Comments
 (0)