I’m prepping my project for a 1.0 release! 2+ years of work is about to be officially turned over. Version 1.0 will probably never go live as we have to go through certification which will take months and by then we’ll be a few versions newer.
My issue. I guess we haven’t tried to run a production build in quite some time. The build will complete with no issues, but when loading the site I get an error "Attempted to register an element with the same name already exists. Name : e."
I cannot share this code, but what can I be looking for with this vague error. As far as I know nothing is named the same. My last debug message before the error is the resources being loaded.
Well perhaps try commenting out parts until it passes to see where it gets stuck. Webpack can be quite a bi*** so I hope you’ll get it sorted before commenting out every single component
That’s what I have been doing. Nothing is making sense I cleared out my resources index to class added to the array and it works, add another and nothing. I look at the file that I added and I don’t see the reason for failure.
They are global, so I’m not importing them on the consuming view.
Edit: normally one would introduce this via dialog usage, import view model and use it directly instead of a string. The issue with direct/static view model import is its module gets concatenated, so its get renamed and many other things. One way to handle is to add a line like this:
PLATFORM.moduleName('path to vm')
Just that, to let aurelia webpack plugin kick in to prevent those webpack behaviors
Changing all my global resources to use PLATFORM.moduleName fixed it.
Sadly at one point I had it that way and changed it because I liked how clean it was to just reference the class there That was a long exercise to update 3 plugins with full build pipelines and then update the actually application
I would not suggest sudden change from static import to platform moduleName across entire codebase, especially when the problem may just come from one or 2 places. It sounds you need some help, if its sharable i can help have a look. For the style, does it say or warn anything when style goes missing?