How do I correctly clone a JavaScript object? It works if I remove the import and export statements to make it plain js and include it in