Skip to content

Commit

Permalink
Fix loader concatentation bug (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefvhuynh authored and arunoda committed May 9, 2016
1 parent bdf72b7 commit 1053fe2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
22 changes: 11 additions & 11 deletions dist/manager.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/manager.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified dist/server/build.js
100755 → 100644
Empty file.
4 changes: 3 additions & 1 deletion dist/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ exports.default = function (configType, baseConfig, configDir) {

logger.info('=> Loading custom webpack config.');

customConfig.module = customConfig.module || {};

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, customConfig.module || {}, {
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: 3 additions & 1 deletion src/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export default function (configType, baseConfig, configDir) {

logger.info('=> Loading custom webpack config.');

customConfig.module = customConfig.module || {};

return {
...customConfig,
// We'll always load our configurations after the custom config.
Expand All @@ -87,7 +89,7 @@ export default function (configType, baseConfig, configDir) {
module: {
...config.module,
// We need to use our and custom loaders.
...customConfig.module || {},
...customConfig.module,
loaders: [
...config.module.loaders,
...customConfig.module.loaders || [],
Expand Down

0 comments on commit 1053fe2

Please sign in to comment.