Skip to content

Commit

Permalink
Changes the way it loads custom webpacck config to more generic way. …
Browse files Browse the repository at this point in the history
…Support for postLoaders
  • Loading branch information
stewartduffy committed Apr 13, 2016
1 parent 4b416c9 commit 2005b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions dist/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ exports.default = function (baseConfig, configDir) {
return (0, _extends3.default)({}, customConfig, config, {
// We need to use our and custom plugins.
plugins: [].concat((0, _toConsumableArray3.default)(config.plugins), (0, _toConsumableArray3.default)(customConfig.plugins || [])),
module: (0, _extends3.default)({}, config.module, {
// We need to use our and custom loaders.
preLoaders: [].concat((0, _toConsumableArray3.default)(customConfig.module.preLoaders || [])),
module: (0, _extends3.default)({}, config.module, customConfig.module || {}, {
loaders: [].concat((0, _toConsumableArray3.default)(config.module.loaders), (0, _toConsumableArray3.default)(customConfig.module.loaders || []))
})
});
Expand Down
4 changes: 1 addition & 3 deletions src/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ export default function (baseConfig, configDir) {
module: {
...config.module,
// We need to use our and custom loaders.
preLoaders: [
...customConfig.module.preLoaders || [],
],
...customConfig.module || {},
loaders: [
...config.module.loaders,
...customConfig.module.loaders || [],
Expand Down

0 comments on commit 2005b27

Please sign in to comment.