Skip to content

Commit 42b6dbb

Browse files
authored
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.
1 parent 66df784 commit 42b6dbb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vue.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ config = {
1010

1111
module.exports = {
1212
runtimeCompiler: true,
13-
baseUrl: '/',
13+
baseUrl: process.env.NODE_ENV === 'production'
14+
? '/'
15+
: `${config.https ? 'https' : 'http'}://${config.host}:${config.port}/`,
1416
outputDir: 'web/dist',
1517
filenameHashing: process.env.NODE_ENV === 'production' ? true : false,
1618
css: {
@@ -21,6 +23,7 @@ module.exports = {
2123
// host: config.host,
2224
// port: config.port,
2325
https: config.https,
26+
headers: { 'Access-Control-Allow-Origin': '*' },
2427
before(app, server) {
2528
const sane = require('sane')
2629
var watcher = sane(path.join(__dirname, config.watchDir), {glob: ['**/*']});
@@ -43,4 +46,4 @@ module.exports = {
4346
config.plugins.delete('preload')
4447
config.plugins.delete('prefetch')
4548
}
46-
}
49+
}

0 commit comments

Comments
 (0)