From f175427a617fd6628ce59558e590d3195b61ad9e Mon Sep 17 00:00:00 2001 From: Serge Date: Fri, 15 Mar 2019 18:08:12 +0800 Subject: [PATCH] fix bug --- vue.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vue.config.js b/vue.config.js index 5d46f51b..f77d6598 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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())