получит ответ в сообществе дискорд - если коротко , то цитирую -
]linusborg: You are externalizing pinia in roll-up options. That means it's not included in your build result.
[2:48]linusborg: The consuming website would need to include it.
[2:49]linusborg: Which is likely tricky if you build an esm file, it would require an importmap, which is not a standard browser feature yet
если еще короче, нужно делать импортмапы