12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- const path = require('path')
- let settings = {}
- try {
- settings = require('./local.json')
- if (settings.target && settings.target.endsWith('/')) {
-
-
- settings.target = settings.target.replace(/\/$/, '')
- }
- console.log('Using local dev server settings (/config/local.json):')
- console.log(JSON.stringify(settings, null, 2))
- } catch (e) {
- console.log('Local dev server settings not found (/config/local.json)')
- }
- const target = settings.target || 'http://localhost:4000/'
- module.exports = {
- build: {
- env: require('./prod.env'),
- index: path.resolve(__dirname, '../dist/index.html'),
- assetsRoot: path.resolve(__dirname, '../dist'),
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- productionSourceMap: true,
-
-
-
-
- productionGzip: false,
- productionGzipExtensions: ['js', 'css']
- },
- dev: {
- env: require('./dev.env'),
- port: 8080,
- settings,
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- proxyTable: {
- '/api': {
- target,
- changeOrigin: true,
- cookieDomainRewrite: 'localhost'
- },
- '/nodeinfo': {
- target,
- changeOrigin: true,
- cookieDomainRewrite: 'localhost'
- },
- '/socket': {
- target,
- changeOrigin: true,
- cookieDomainRewrite: 'localhost',
- ws: true
- },
- '/oauth/revoke': {
- target,
- changeOrigin: true,
- cookieDomainRewrite: 'localhost'
- }
- },
-
-
-
-
-
- cssSourceMap: false
- }
- }
|