diff --git a/dev-server/index.js b/dev-server/index.js index e9b38dbcb..d5a5c1b9a 100644 --- a/dev-server/index.js +++ b/dev-server/index.js @@ -6,7 +6,7 @@ var webpack = require('webpack'); var compiler = webpack(require('../webpack.config.js')); var handler = require('./handler'); var log = require('./log'); -var routes = require('../src/routes.json'); +var routes = require('../src/routes.json').concat(require('../src/routes-dev.json')); // Create server var app = express(); diff --git a/src/routes-dev.json b/src/routes-dev.json new file mode 100644 index 000000000..4dc57aeaf --- /dev/null +++ b/src/routes-dev.json @@ -0,0 +1,8 @@ +[ + { + "name": "components", + "pattern": "^/components/?$", + "view": "components/components", + "title": "Components" + } +] \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 4ef9757cb..1599672d0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,6 +7,10 @@ var webpack = require('webpack'); var routes = require('./src/routes.json'); +if (process.env.NODE_ENV !== 'production') { + routes = routes.concat(require('./src/routes-dev.json')); +} + var VersionPlugin = function (options) { this.options = options || {}; return this;