From 42b6dbb772c362165a867c921128ca32ae68f8ec Mon Sep 17 00:00:00 2001 From: Chase Giunta Date: Wed, 8 Aug 2018 12:03:47 -0500 Subject: [PATCH] Closes #9 This has the terrible side effect of a dumb console message: ``` App running at: - Local: http://localhost:8080/http://localhost:8080/ - Network: http://10.0.1.12:8080/http://localhost:8080/ ``` Hopefully can be addressed in a later release. --- vue.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vue.config.js b/vue.config.js index 4fa2afc..606259f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -10,7 +10,9 @@ config = { module.exports = { runtimeCompiler: true, - baseUrl: '/', + baseUrl: process.env.NODE_ENV === 'production' + ? '/' + : `${config.https ? 'https' : 'http'}://${config.host}:${config.port}/`, outputDir: 'web/dist', filenameHashing: process.env.NODE_ENV === 'production' ? true : false, css: { @@ -21,6 +23,7 @@ module.exports = { // host: config.host, // port: config.port, https: config.https, + headers: { 'Access-Control-Allow-Origin': '*' }, before(app, server) { const sane = require('sane') var watcher = sane(path.join(__dirname, config.watchDir), {glob: ['**/*']}); @@ -43,4 +46,4 @@ module.exports = { config.plugins.delete('preload') config.plugins.delete('prefetch') } -} \ No newline at end of file +}