Search code examples
polymerpolymer-1.0polymer-3.x

Is there a way to import Polymer 3 components in Polymer 1?


I have just received a legacy project which was implemented using Polymer 1. For some reasons, I have a plan to change it to Polymer 3. There are lots of custom components. Also, it is a huge project and I want to gradually transform it step-by-step. My plan is that I want to change the components first and import them to the old project. When all components are finished, I will go for the rest of the project.

I want to ask if it is possible to take this approach and how? I have searched through the Internet but I cannot find any recommended approach in this case. If there is other recommended method, please tell me.

Thank you in advance!


Solution

  • Sorry but the answer is no you can´t. You can load Polymer as library only once (It is using the same namespace) per browser window so you must decide which version to use. The only way i think i will be possible is with an iframe but i guess that is not a suitable way for you.