File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 224224 "update-webdriver" : " node node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update" ,
225225 <%_ } -%><% if(filters.mongo) { %>
226226 "start:mongo" : " docker run --rm -d -p 27017:27017 --name mongo mongo" ,<% } %>
227- "start" : " node server"
227+ "start" : " node server" ,
228+ "start:client" : " webpack-dev-server --config webpack.dev.js" ,
229+ "start:server" : " node server"
228230 },
229231 "private" : true
230232}
Original file line number Diff line number Diff line change @@ -341,6 +341,28 @@ module.exports = function makeWebpackConfig(options) {
341341 } ;
342342 }
343343
344+ /**
345+ * Dev server configuration
346+ * Reference: http://webpack.github.io/docs/configuration.html#devserver
347+ * Reference: http://webpack.github.io/docs/webpack-dev-server.html
348+ */
349+ config . devServer = {
350+ contentBase : './client/' ,
351+ hot : true ,
352+ proxy : {
353+ '/api' : 'http://localhost:<%= devPort %>' ,
354+ '/auth' : 'http://localhost:<%= devPort %>' ,
355+ '/socket.io' : 'http://localhost:<%= devPort %>' ,
356+ } ,
357+ stats : {
358+ modules : false ,
359+ cached : false ,
360+ colors : true ,
361+ chunks : false ,
362+ } ,
363+ historyApiFallback : true ,
364+ } ;
365+
344366 config . node = {
345367 global : true ,
346368 process : true ,
You can’t perform that action at this time.
0 commit comments