jbrowse icon indicating copy to clipboard operation
jbrowse copied to clipboard

Find way to merge arrays in config without "overwriting elements"

Open cmdcolin opened this issue 7 years ago • 2 comments

There are some scenarios where if you try to define an array of things in the config then it can overwrite existing defaults. Technically it's not "overwriting" actually, but mixing together arrays of things, which has weird effects

One example is for the menuTemplate configuration you need to define "placeholders" http://gmod.827538.n3.nabble.com/Gmod-ajax-quot-menuTemplate-quot-placeholder-examples-breaks-highlighting-td4057857.html

There are other situations like if you try to define plugins in multiple config files then it can cause interference, so it really is best to only define plugins in a single jbrowse config file, not some in jbrowse.conf, some in trackList.json, etc.

cmdcolin avatar Jun 06 '17 03:06 cmdcolin

cc @rdhayes

cmdcolin avatar Jun 06 '17 03:06 cmdcolin

Random thing I stumbled on

https://github.com/survivejs/webpack-merge

Merging configs with array appending

cmdcolin avatar Jun 18 '20 22:06 cmdcolin