Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Avoid exceptions in empty config
Browse files Browse the repository at this point in the history
  • Loading branch information
eliperelman committed Feb 9, 2017
1 parent 5c6a65b commit ab46ee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "webpack-chain",
"version": "1.0.0",
"version": "1.0.1",
"main": "src/Config.js",
"repository": "mozilla-rpweb/webpack-chain",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/Config.js
Expand Up @@ -57,15 +57,15 @@ module.exports = class {

toConfig() {
const entries = this.entries.entries();
const config = Object.assign(this.options.entries(), {
const config = Object.assign({}, this.options.entries(), {
node: this.node.entries(),
output: this.output.entries(),
resolve: this.resolve.toConfig(),
resolveLoader: this.resolveLoader.toConfig(),
devServer: this.devServer.entries(),
plugins: this.plugins.values().map(value => value.init(value.plugin, value.args)),
module: this.module.toConfig(),
entry: Object
entry: entries && Object
.keys(entries)
.reduce((acc, key) => {
acc[key] = entries[key].values();
Expand Down

0 comments on commit ab46ee0

Please sign in to comment.