Skip to content
Permalink
Browse files

feat: add proxy dev support :)

  • Loading branch information...
lolimay committed Mar 6, 2019
1 parent 04d18f7 commit 473de2db0f36f80ac92b4d7073bdadfb6bb558d3
Showing with 10 additions and 1 deletion.
  1. +10 −1 build/webpack.config.js
@@ -7,6 +7,7 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const optimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
const merge = require('webpack-merge')
const port = '52050' // Dev Port

function resolve (dir) {
return path.join(__dirname, '..', dir)
@@ -59,7 +60,15 @@ const development = merge(common, {
devServer: {
contentBase: './dist',
historyApiFallback: true,
hot: true
hot: true,
proxy: {
'/api': {
target: 'http://localhost:'+ port +'/',
pathRewrite: {'^/api' : ''},
changeOrigin: true,
secure: false,
}
}
},
optimization: {
removeAvailableModules: false,

0 comments on commit 473de2d

Please sign in to comment.
You can’t perform that action at this time.