Skip to content

Commit

Permalink
Adds support for preLoaders in custom webpack config (#107)
Browse files Browse the repository at this point in the history
* Adds support for preLoaders in custom webpack config

* Changes the way it loads custom webpacck config to more generic way. Support for postLoaders
  • Loading branch information
stewartduffy authored and arunoda committed Apr 13, 2016
1 parent f705200 commit f3e1a16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions dist/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +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.
module: (0, _extends3.default)({}, config.module, customConfig.module || {}, {
loaders: [].concat((0, _toConsumableArray3.default)(config.module.loaders), (0, _toConsumableArray3.default)(customConfig.module.loaders || []))
})
});
Expand Down
1 change: 1 addition & 0 deletions src/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default function (baseConfig, configDir) {
module: {
...config.module,
// We need to use our and custom loaders.
...customConfig.module || {},
loaders: [
...config.module.loaders,
...customConfig.module.loaders || [],
Expand Down

0 comments on commit f3e1a16

Please sign in to comment.