jbrowse
jbrowse copied to clipboard
Find way to merge arrays in config without "overwriting elements"
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.
cc @rdhayes
Random thing I stumbled on
https://github.com/survivejs/webpack-merge
Merging configs with array appending