| | |
| | | 'use strict' |
| | | const settings = require('./src/settings.js') |
| | | const path = require('path') |
| | | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | | } |
| | |
| | | devServer: { |
| | | port: port, |
| | | open: false, |
| | | disableHostCheck: true, |
| | | overlay: { |
| | | warnings: false, |
| | | errors: true |
| | |
| | | // change xxx-api/login => mock/login |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: 'http://120.24.23.155:8301/', |
| | | target: '127.0.0.1:8301/', |
| | | // target: 'http://120.24.23.155:8301/', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |
| | |
| | | // provide the app's title in webpack's name field, so that |
| | | // it can be accessed in index.html to inject the correct title. |
| | | name: name, |
| | | devtool: 'source-map', |
| | | resolve: { |
| | | alias: { |
| | | '@': resolve('src') |
| | |
| | | .plugin('ScriptExtHtmlWebpackPlugin') |
| | | .after('html') |
| | | .use('script-ext-html-webpack-plugin', [{ |
| | | // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | inline: /runtime\..*\.js$/ |
| | | }]) |
| | | .end() |