Skip to content
This repository was archived by the owner on Jun 18, 2019. It is now read-only.
This repository was archived by the owner on Jun 18, 2019. It is now read-only.

Extending duplicate deeply-nested configs #103

@matthew-dean

Description

@matthew-dean

Problem: I am using Nuxt.js which exports an extendable config for webpack. I'd like to extend "sass-loader" in that config, BUT...

  1. The root list of module loaders contains both "vue-loader" and "sass-loader", with respective options.
  2. Under "vue-loader" options, it contains a loaders property, which has a sub-property of sass, which contains an array of loaders, ONE of which is "sass-loader", which then, of course has a list of duplicated options for "sass-loader".

I'd like to use webpack-config to extend/merge instances of "sass-loader" wherever { loader: 'sass-loader' } is found in the entire config sub-tree. (Ideally, I would also check that the exported config doesn't have any variation between duplicate loader options.)

Can a feature be added where merging includes a deep key/value lookup of the object tree, and then merges the options at that location? Or can you think of another way to do this?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions