Skip to content

Commit

Permalink
fix(webpack): clone config.entry (fixes #4849) (#5236)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliendargelos authored and pi0 committed Mar 14, 2019
1 parent b22d97e commit 8216765
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/webpack/src/config/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
`${querystring.stringify(hotMiddlewareClientOptions)}&path=${clientPath}`.replace(/\/\//g, '/')

// Entry points
config.entry = {
config.entry = Object.assign({}, config.entry, {
app: [path.resolve(buildDir, 'client.js')]
}
})

// Add HMR support
if (this.dev) {
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack/src/config/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export default class WebpackServerConfig extends WebpackBaseConfig {
Object.assign(config, {
target: 'node',
node: false,
entry: {
entry: Object.assign({}, config.entry, {
app: [path.resolve(this.buildContext.options.buildDir, 'server.js')]
},
}),
output: Object.assign({}, config.output, {
filename: 'server.js',
libraryTarget: 'commonjs2'
Expand Down

0 comments on commit 8216765

Please sign in to comment.