-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LPS-145293 Add support for deployment of custom elements as ES modules #1916
Conversation
…type="module"> Note that I'm using a TopHeadDynamicInclude to render the portlet's .js files because we cannot use the standard mechanisms based on portlet's properties as those are only intended for plain JavaScript files. The TopHeadDynamicInclude registers URLs whenever a new RemoteAppEntryPortlet is deployed and the cleanup is made when the Portlet is destroyed (listening to the event using OSGi). We keep reference counts to each URL so that if more than one portlet refers to the same JS URL, it is not removed from the page until all portlets have been unregistered.
Although it is not failing now, we need to make sure that the importmap node appears before any other <script> node so I'm setting this to the maximum value to make it appear on top of any other DynamicInclude. This is because it is very likely that in the future we render ESM <script> nodes from DynamicIncludes.
ci:test:sf |
CI is automatically triggering the following test suites:
|
✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPS-145293-1 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#1809 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Importer:publish-testray-report#6628 |
✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPS-145293-1 1 Successful Jobs:For more details click here. |
Jenkins Build:test-portal-source-format#1809 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Importer:publish-testray-report#6629 |
Just started reviewing :) |
Jenkins Build:test-portal-source-format#1810 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Importer:publish-testray-report#6630 |
Jenkins Build:test-portal-source-format#1810 Jenkins Report:jenkins-report.html Jenkins Suite:sf Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Importer:publish-testray-report#6631 |
ci:test:relevant |
❌ ci:test:stable - 24 out of 28 jobs passed❌ ci:test:relevant - 24 out of 29 jobs passed in 2 hours 7 minutesClick here for more details.This pull is eligible for reevaluation. When this upstream build has completed, using the following CI command will compare this pull request result against a more recent upstream result: ci:reevaluate:1337401_1096 Base Branch:Branch Name: master Upstream Comparison:Branch GIT ID: 233dea919ef0ab6061f0b27121e3b76d3b960383 ci:test:stable - 24 out of 28 jobs PASSED4 Failed Jobs:24 Successful Jobs:
ci:test:relevant - 24 out of 29 jobs PASSED5 Failed Jobs:
24 Successful Jobs:
For more details click here.Failures unique to this pull:
Failures in common with acceptance upstream results at 233dea9:
Test bundle downloads:
|
Jenkins Build:test-portal-acceptance-pullrequest(master)#1096 Jenkins Report:jenkins-report.html Jenkins Suite:relevant Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Build:[master] ci:test:relevant - izaera > liferay-frontend - PR#1916 - 2022-02-17[01:04:07] Testray Importer:publish-testray-report#3176 |
Reviewed. Test failures are unrelated. ✔️ |
ci:test:stable |
❌ ci:test:stable - 24 out of 28 jobs passed❌ ci:test:relevant - 24 out of 29 jobs passed in 3 hours 3 minutesClick here for more details.This pull is eligible for reevaluation. When this upstream build has completed, using the following CI command will compare this pull request result against a more recent upstream result: ci:reevaluate:1327401_2544 Base Branch:Branch Name: master Upstream Comparison:Branch GIT ID: 233dea919ef0ab6061f0b27121e3b76d3b960383 ci:test:stable - 24 out of 28 jobs PASSED4 Failed Jobs:24 Successful Jobs:
ci:test:relevant - 24 out of 29 jobs PASSED5 Failed Jobs:
24 Successful Jobs:
For more details click here.Failures unique to this pull:
Failures in common with acceptance upstream results at 233dea9:
Test bundle downloads:
|
Jenkins Build:test-portal-acceptance-pullrequest(master)#2544 Jenkins Report:jenkins-report.html Jenkins Suite:relevant Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Build:[master] ci:test:relevant - izaera > liferay-frontend - PR#1916 - 2022-02-17[01:30:49] Testray Importer:publish-testray-report#7884 |
Reviewed again. Test failures are unrelated. ✔️ |
Jenkins Build:test-portal-acceptance-pullrequest(master)#921 Jenkins Report:jenkins-report.html Jenkins Suite:stable Pull Request:liferay-frontend#1916 Testray Routine:EE Pull Request Testray Importer:publish-testray-report#2950 |
Forwarded as brianchandotcom#113562 |
⚠⚠ NO NEED TO REVIEW THIS, IT WAS ALREADY REVIEWED IN A PREVIOUS PR ⚠⚠
This adds a new boolean field so that custom element remote apps may be bootstrapped using
<script type="module">
as opposed to plain vanilla JavaScript.This is needed for:
react
from the portalThe simplest way to test that this works would be creating a new remote app, checking "Use ES modules":
and then looking at how the
<script>
tag is rendered: