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