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

webpackMerge 0.8.3 unsafe to call twice #52

Closed
sullivanpt opened this issue Mar 16, 2016 · 5 comments
Closed

webpackMerge 0.8.3 unsafe to call twice #52

sullivanpt opened this issue Mar 16, 2016 · 5 comments
Labels

Comments

@sullivanpt
Copy link

Don't know if this is by design or a bug in webpack merge, but attempting to call it twice in a row as in the example results in the 'Client' getting some configuration data from the 'Server'.

module.exports = [
  // Client
  webpackMerge({}, defaultConfig, commonConfig, clientConfig),

  // Server
  webpackMerge({}, defaultConfig, commonConfig, serverConfig)
]
@PatrickJS PatrickJS added the bug label Mar 16, 2016
@PatrickJS
Copy link
Member

I have to replace webpack-merge with something like extends or create webpack-default

@sullivanpt
Copy link
Author

I solved it by wrapping with "_.cloneDeep(webpackMerge(..."

@PatrickJS
Copy link
Member

@sullivanpt can you make a PR and use https://www.npmjs.com/package/lodash.clonedeep

@sullivanpt
Copy link
Author

I haven't been able to reproduce with webpack-merge@0.7.3 (which is what universal-starter currently depends on) so I'm inclined to consider it a bug in @0.8.3. Needs more investigation I think.

@sullivanpt
Copy link
Author

Closing this in favor of survivejs/webpack-merge#12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants