BUGFIX: Neos 8.3 plugins dont lower yield in plugins #3604
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #3470
This resolves a regression from the EsBuild change in 8.2 as we removed the polyfills (
polyfill.js
) and thus also the regenerator runtime polyfill (import 'regenerator-runtime/runtime';
). We removed the polyfills as we were from then on targeting only modern Browsers (at least ES2020) but i didnt think of the fact that build plugins might transpile down to an older es version and thus requireregeneratorRuntime
.The problem is obscured because other older Neos Ui Plugins might already ship the global
regeneratorRuntime
and then other plugins can profit from this invisible dependency and work. But as soon as no other plugin is installed anymore or the settings loading order changes (due to a deployment on another unix system where settings might be picked up in a different order) your plugin might stop working.Plugins using the modern webpack extensibility (v8.2 or 8.3) should simply at no time build plugins which require the legacy
regeneratorRuntime
. This should be the default - and its currently not.Removing the
babel-plugin-transform-regenerator
from our webpack config works and doesnt transform the code.yield
stays a js-generator and will not be rewritten to a state machine which depends onregeneratorRuntime
.What I did
How I did it
How to verify it