Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
fcwu
GitHub Repository: fcwu/docker-ubuntu-vnc-desktop
Path: blob/develop/web/config/index.js
387 views
1
'use strict'
2
// Template version: 1.3.1
3
// see http://vuejs-templates.github.io/webpack for documentation.
4
5
const path = require('path')
6
const BACKEND = process.env.BACKEND || 'http://127.0.0.1:6080'
7
8
module.exports = {
9
dev: {
10
11
// Paths
12
assetsSubDirectory: 'static',
13
assetsPublicPath: './',
14
proxyTable: {
15
'/api': {
16
target: BACKEND,
17
changeOrigin: true,
18
secure: false
19
},
20
'/websockify': {
21
target: BACKEND,
22
// logLevel: 'debug',
23
ws: true,
24
changeOrigin: true
25
}
26
},
27
28
// Various Dev Server settings
29
host: 'localhost', // can be overwritten by process.env.HOST
30
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
31
autoOpenBrowser: false,
32
errorOverlay: true,
33
notifyOnErrors: true,
34
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
35
36
// Use Eslint Loader?
37
// If true, your code will be linted during bundling and
38
// linting errors and warnings will be shown in the console.
39
useEslint: true,
40
// If true, eslint errors and warnings will also be shown in the error overlay
41
// in the browser.
42
showEslintErrorsInOverlay: false,
43
44
/**
45
* Source Maps
46
*/
47
48
// https://webpack.js.org/configuration/devtool/#development
49
devtool: 'cheap-module-eval-source-map',
50
51
// If you have problems debugging vue-files in devtools,
52
// set this to false - it *may* help
53
// https://vue-loader.vuejs.org/en/options.html#cachebusting
54
cacheBusting: true,
55
56
cssSourceMap: true
57
},
58
59
build: {
60
// Template for index.html
61
index: path.resolve(__dirname, '../dist/index.html'),
62
63
// Paths
64
assetsRoot: path.resolve(__dirname, '../dist'),
65
assetsSubDirectory: 'static',
66
assetsPublicPath: './',
67
68
/**
69
* Source Maps
70
*/
71
72
productionSourceMap: true,
73
// https://webpack.js.org/configuration/devtool/#production
74
devtool: '#source-map',
75
76
// Gzip off by default as many popular static hosts such as
77
// Surge or Netlify already gzip all static assets for you.
78
// Before setting to `true`, make sure to:
79
// npm install --save-dev compression-webpack-plugin
80
productionGzip: false,
81
productionGzipExtensions: ['js', 'css'],
82
83
// Run the build command with an extra argument to
84
// View the bundle analyzer report after build finishes:
85
// `npm run build --report`
86
// Set to `true` or `false` to always turn it on or off
87
bundleAnalyzerReport: process.env.npm_config_report
88
}
89
}
90
91