React Plugin + Spectrum Web Components: "Failed to load script file" in console

Hi all :grin:

Trying to add the tooltip spectrum web component to my InDesign plugin made with react/typescript/webpack.

Code transpiles fine, but tooltip doesn’t work and I’m greeted with this error in console when I hover the button with the tooltip:

Do you see that part underlined in green? UXP seems to be looking for an incorrectly concatenated filepath. I can confirm the vendors-node_modules_swc-uxp-internal_tooltip_node ... file exists in my dist/ dir.

I’ve yarn added both @swc-react/tooltip and @swc-uxp-wrappers/tooltip (instructions followed). Tooltip SWC is listed as supported. I have tried deleting node_modules and re-adding packages.

This seems to be happening with other spectrum web components as well. Thanks in advance for any insight ( :ring_buoy: @panbhati).

EDIT 1: I am thinking this may be a webpack issue.

I fixed the error by changing my webpack to export just one bundle file, like the example, however tooltip still doesn’t work and I’m now getting some CustomElementRegistry errors.

Edit: fixed all my errors, had <sp-theme> declared on top of the Theme package.