Open web-padawan opened 6 years ago
@usergenic IIRC you have been working on certain rollup workarounds. Have you noticed something similar to this issue, and do you have any idea what could happen and how do we investigate?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is quite annoying, it would be nice to get it fixed. However, it's less important for us at the moment, because in Vaadin we switched to npm using webpack as a default bundler.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description
In Vaadin we use a ThemableMixin allowing to inject styles into custom elements via snippets
<dom-module id="style-name" theme-for="component-name">
. It is done by overriding finalize static method.So, we assume the order of the scripts execution to ensure the theme modules are added to the DOM before the
customElements.define
is called for the same tag name. In Polymer 3 it looks like this:However, after running
polymer build
on a small project (which only has shell and no fragments, with a few components), the order of scripts in resulting output is reversed:Tested this with a sample project using 2 components: text-field and button, both separately and together. Same happens when importing Material versions of components.
Steps to reproduce
Originally reported at vaadin/vaadin-themable-mixin#36