Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend devMiddlewareOptions with config.devServer #723

Merged
merged 6 commits into from
Apr 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions dist/server/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
value: true
});

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

exports.default = function (configDir) {
// Build the webpack configuration using the `getBaseConfig`
// custom `.babelrc` file and `webpack.config.js` files
Expand All @@ -17,11 +21,11 @@ exports.default = function (configDir) {
}

var compiler = (0, _webpack2.default)(config);
var devMiddlewareOptions = {
var devMiddlewareOptions = (0, _extends3.default)({
noInfo: true,
publicPath: config.output.publicPath,
watchOptions: config.watchOptions || {}
};
}, config.devServer);

var router = new _express.Router();
router.use((0, _webpackDevMiddleware2.default)(compiler, devMiddlewareOptions));
Expand Down
1 change: 1 addition & 0 deletions src/server/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function (configDir) {
noInfo: true,
publicPath: config.output.publicPath,
watchOptions: config.watchOptions || {},
...config.devServer,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I pass the config.devServer to, to manipulate these configurations?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be in the webpack.config.js export I'm pretty sure.

};

const router = new Router();
Expand Down