This commit is contained in:
Serge 2019-03-15 18:08:12 +08:00 committed by Pan
parent 183249a5d4
commit f175427a61
1 changed files with 6 additions and 3 deletions

View File

@ -1,12 +1,15 @@
'use strict'
require('@babel/register')
const path = require('path')
const settings = require('./src/settings.js')
const settings = require('./src/settings.js').default
const { name } = settings
function resolve(dir) {
return path.join(__dirname, dir)
}
const port = 9527 // dev port
// Explanation of each configuration item You can find it in https://cli.vuejs.org/config/
module.exports = {
/**
@ -23,7 +26,7 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development' ? 'error' : false,
productionSourceMap: false,
devServer: {
port: 9527,
port: port,
open: true,
overlay: {
warnings: false,
@ -40,7 +43,7 @@ module.exports = {
},
after(app) {
const bodyParser = require('body-parser')
require('@babel/register')
// parse app.body
// http://expressjs.com/en/4x/api.html#req.body
app.use(bodyParser.json())