setCustomElements method registor customElement Json to winto object how to change this file for multiple component
Can we have multiple customElements json in storybook app?
cc @daKmoR
@daKmoR - Can you please share your thoughts on above question.?
generally there should only be one customElements.json per repository - it can hold information for multiple tags.
If you really need to split it up you will need to merge the data yourself with something like this (psoido code):
// there should only be one `customElements.json`- workaround for use more
const ce1 = require('../customElements.json');
const ce2 = require('../my-other-component/customElements.json');
const finalCe = {
...ce1, // probably not needed
tags: [
...ce1.tags,
...ce2.tags
]
}
@daKmoR - Thanks for hint. It solved my problem, I ran into this issue because we are using Lerna for monorepo and my repo structure is bit complicated.
Thanks again
Most helpful comment
generally there should only be one
customElements.jsonper repository - it can hold information for multiple tags.If you really need to split it up you will need to merge the data yourself with something like this (psoido code):