-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
ES-Module Plugin cant be loaded * #3097
Comments
mhsdesign
changed the title
ES-Module Plugin cant be loaded \*
ES-Module Plugin cant be loaded *
Apr 5, 2022
Fair enough if you ask, where did you forge an es module neos ui plugin? Via esbuild. |
I made a proposal package: https://github.com/mhsdesign/MhsDesign.ProposalNeosUiEsmPluginLoader |
I would rather suggest to use native esm dynamic imports (supported with es2020 and neos 8.2 with esbuild 🎉) |
mhsdesign
added a commit
that referenced
this issue
Apr 2, 2023
mhsdesign
added a commit
that referenced
this issue
Apr 22, 2023
TASK: #3097 allow module script plugins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
* unless brute forced via AOP in StyleAndJavascriptInclusionService
Description
Imagine you have a nice ESM Plugin and try to inject it via:
now we get an error about
import
cannot be used because the script tag doesnt tell its an esm.the problem is, that no attributes for the script tag are allowed except
defer
Steps to Reproduce
write
Neos.Neos.Ui.resources.javascript.'My.Plugin'.type: 'module'
Expected behavior
a script tag with
<script type="module">
is rendered analog to thedefer
optionActual behavior
the option is ignored
Affected Versions
UI: since ever
Solution
we would need to not only look out for the
defer
key but also for the keytype
neos-ui/Classes/Domain/Service/StyleAndJavascriptInclusionService.php
Line 100 in 6ce2774
also we could consider having an actual future proof
attributes
array which will be just rendered like in Neos.Fusion:Tagi implemented this in https://github.com/mhsdesign/MhsDesign.ProposalNeosUiEsmPluginLoader
The text was updated successfully, but these errors were encountered: