Skip to content

Commit

Permalink
Configure 'npm run dev' to use NODE_ENV to serve either dev or produc…
Browse files Browse the repository at this point in the history
…tion versions.
  • Loading branch information
normangilmore committed Jun 8, 2017
1 parent e6ce921 commit e68e778
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"scripts": {
"lint": "eslint",
"dev": "NODE_ENV=development node --harmony ./webpack/dev-server.js",
"serve": "NODE_ENV=development webpack-dev-server --config webpack.config.js",
"dev": "node --harmony ./webpack/dev-server.js",
"serve": "webpack-dev-server --config webpack/dev.config.js",
"build": "NODE_ENV=development CLEANDIST=true webpack --config webpack.config.js --progress",
"build:quiet": "NODE_ENV=development CLEANDIST=true webpack --config webpack.config.js --bail",
"deploy": "NODE_ENV=production CLEANDIST=true webpack --config webpack.config.js --progress",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function get_config() {
case 'production':
return 'prod.config.js';
default:
return 'dev.config.js';
return 'base.config.js';
}
}

Expand Down
2 changes: 1 addition & 1 deletion webpack/dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require('babel-register');
console.log('Building with dev.config.js\n');
var webpack = require('webpack');

const config = require('./base.config');
const config = require('../webpack.config.js');

const PUBLIC_PATH = config.output.publicPath;

Expand Down

0 comments on commit e68e778

Please sign in to comment.