Skip to content

Commit

Permalink
Merge pull request #2545 from ohadlevy/webpack-dev-server
Browse files Browse the repository at this point in the history
adds support to using webpack-dev-server
  • Loading branch information
martinpovolny committed Dec 23, 2017
2 parents 0a2efb0 + 5b4e241 commit e508443
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/webpack/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const merge = require('webpack-merge')
const sharedConfig = require('./shared.js')
const { settings, output } = require('./configuration.js')
const { env } = require('process')

module.exports = merge(sharedConfig, {
devtool: 'cheap-eval-source-map',
Expand All @@ -27,6 +28,19 @@ module.exports = merge(sharedConfig, {
historyApiFallback: true,
watchOptions: {
ignored: /node_modules/
},
proxy: {
'/': {
target: `http://${settings.dev_server.host}:${env.PORT || '3000'}`,
secure: false,
},
'/ws': {
target: `ws://${settings.dev_server.host}:${env.WS_PORT ||
env.PORT ||
'3000'}`,
secure: false,
ws: true,
},
}
}
})

0 comments on commit e508443

Please sign in to comment.