Skip to content
Commit 4c9c4c8e authored by Jonathan Desrosiers's avatar Jonathan Desrosiers
Browse files

Script loader: Register `@wordpress` scripts.

This allows the packages to be consumed by plugins and core itself.
The code has been based on the work done in the Gutenberg plugin.

We've added an array with all the packages and the vendor packages to
loop through. This sets a convention so all packages will be
registered in the same way. This array can eventually be generated by
a webpack plugin.

We need to register TinyMCE explicitly. Previously TinyMCE was used
by inserting custom `<script>` tags into the relevant admin pages.
This is not suitable for the new editor, so we need to explicitly
register TinyMCE. We could, in the future, refactor the custom
`<script>` tags to use the registered TinyMCE script instead.

Polyfills are inserted into the page only when necessary using
`document.write`.

Props omarreiss, herregroen, youknowriad, gziolo, atimmer.

Merges [43723] to trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44114


git-svn-id: https://core.svn.wordpress.org/trunk@43944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent ab17447b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment