WordPress.org

Make WordPress Core

Ticket #49423: 49423-vendor-webpack-2.diff

File 49423-vendor-webpack-2.diff, 26.1 KB (added by aduth, 19 months ago)
  • package-lock.json

    diff --git a/package-lock.json b/package-lock.json
    index 8400c39acf..2cad614b64 100644
    a b  
    59535953                },
    59545954                "create-hash": {
    59555955                        "version": "1.2.0",
    5956                         "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
     5956                        "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
    59575957                        "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
    59585958                        "dev": true,
    59595959                        "requires": {
     
    59665966                },
    59675967                "create-hmac": {
    59685968                        "version": "1.1.7",
    5969                         "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
     5969                        "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
    59705970                        "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
    59715971                        "dev": true,
    59725972                        "requires": {
     
    60326032                },
    60336033                "css-color-names": {
    60346034                        "version": "0.0.4",
    6035                         "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
     6035                        "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
    60366036                        "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
    60376037                        "dev": true
    60386038                },
     
    69156915                },
    69166916                "diffie-hellman": {
    69176917                        "version": "5.0.3",
    6918                         "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
     6918                        "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
    69196919                        "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
    69206920                        "dev": true,
    69216921                        "requires": {
     
    1763817638                },
    1763917639                "react-autosize-textarea": {
    1764017640                        "version": "3.0.3",
    17641                         "resolved": "http://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
     17641                        "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
    1764217642                        "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==",
    1764317643                        "requires": {
    1764417644                                "autosize": "^4.0.0",
     
    1903319033                },
    1903419034                "sha.js": {
    1903519035                        "version": "2.4.11",
    19036                         "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
     19036                        "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
    1903719037                        "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
    1903819038                        "dev": true,
    1903919039                        "requires": {
  • package.json

    diff --git a/package.json b/package.json
    index 3857459a48..e38f8e478d 100644
    a b  
    6363                "matchdep": "~2.0.0",
    6464                "node-sass": "~4.12.0",
    6565                "source-map-loader": "^0.2.4",
    66                 "uglify-js": "^3.6.0",
    6766                "uglifyjs-webpack-plugin": "2.2.0",
    6867                "wait-on": "3.3.0",
    6968                "webpack": "4.41.0",
  • src/wp-includes/assets/script-loader-packages.php

    diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php
    index 7b10ea5e16..1a65aac77a 100644
    a b  
    1 <?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'ae574a3e6c97a8f964dcbb3ebc12afdb'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'da0fd5e89656a085dce028b7801d5448'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '3f9c4530789ad55104bd4e6fb1d7b2c0'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '205ce2875ce340d29d444c2b6204f1c0'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aba7ab22bcfc07e4378e40e92e7ab85d'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '32349b6b799bb23ecdff857c3a1c85d8'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'b5ff1c6c60ac9bf9e43e71d7a0f992e4'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'a5882b7f029c0a75c9df5b562c076b86'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '493193bef61f5a7f8f8f89ca631a01de'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'ee754416797881e577236b3cc2495651'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'fd429ba1f75a7eee7aef48ce1895249c'), 'compose.js' => array('dependencies' => array('lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '73886b98cede5ee6ca063ddc889ac566'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'a5dfc158a4629acf3eaa4c086bda8992'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '3442a3ba7f75e8c54d93263da11d0e77'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => '9dd473f24e19d3b632d799376da103ed'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '030fdca2819467d4296a129a89763133'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e016dcf6dc5ed48938f8622acbc152f3'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'ee6b351074b0921dcfe09c2fb1ffb06f'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5045831f601200e96ad481e311acfe42'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'cc2c3b1f5dc2e8bfbb2bfb21c50a603f'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '63131715a52708dc239d4eafce97aba0'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '41f8060e94eb56bb3c5d230d8b7dc349'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3e3956f7e4a89e843080316c1ea3ff9f'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c9654deb47ed294f14ff96151af02331'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0181cce8c3861eae44439abdc3c37e7a'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c43b49e3f3da377cefdadb0131ba7a31'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a2eb6e6af4832e39a703494f847a2370'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3bb3f6a7a8127b024342e718ad297e81'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => '23a620781734eaba58ba6c330785209c'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '2e2855269d5ab0ab5f2b9f8811e007a4'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '327a5cae1d26e1724881d6f7a9ec32b1'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '30343cf12ac797ef15c05beb2befdf21'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => '3b3e946b2d484de31e4be1dc7a48001e'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cf36cb89f359dbf8a1b1f2bddbd35606'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => '474a4e9edc27fd2d9679d00ef548c966'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6e6869dc94974fb23e5747bc1cf59e23'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a36cabae37a1aac99726445836474a79'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '455bbe5442bfb84840ff801a9ea5be69'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill'), 'version' => 'ef45226203dde56110939da3aaaa0905'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '110181c4ac96264be701b8a27777b9a2'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3173f285aee099b367ac20385a778615'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '4b20a43e08878013a4cc5812236d6046'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '14dce49ab7da6088abc01bec4529f9d0'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '8cd5499a15fd58371759a3182b50ac33'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f634219101ddcef8327fb62f2bcb6a93'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '5f3b21f75e28874cac2c76a7d05c5e42'));
    2  No newline at end of file
     1<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'ae574a3e6c97a8f964dcbb3ebc12afdb'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'da0fd5e89656a085dce028b7801d5448'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '3f9c4530789ad55104bd4e6fb1d7b2c0'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '205ce2875ce340d29d444c2b6204f1c0'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'aba7ab22bcfc07e4378e40e92e7ab85d'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '32349b6b799bb23ecdff857c3a1c85d8'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-token-list', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => 'b6d6934eafbfedb6ebb256a7b21ff6e5'), 'block-library.js' => array('dependencies' => array('lodash', 'moment', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => 'eec1d27a0bb750fd6696ddda99ff4037'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '493193bef61f5a7f8f8f89ca631a01de'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-compose', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => 'ee754416797881e577236b3cc2495651'), 'components.js' => array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => '5de8215e44936818de18da34794a90ea'), 'compose.js' => array('dependencies' => array('lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '73886b98cede5ee6ca063ddc889ac566'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => 'a5dfc158a4629acf3eaa4c086bda8992'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '3442a3ba7f75e8c54d93263da11d0e77'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => '9dd473f24e19d3b632d799376da103ed'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '10f616de89b12febcbf7a28b3e70f5fb'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => 'e016dcf6dc5ed48938f8622acbc152f3'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'ee6b351074b0921dcfe09c2fb1ffb06f'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5045831f601200e96ad481e311acfe42'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'cc2c3b1f5dc2e8bfbb2bfb21c50a603f'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '63131715a52708dc239d4eafce97aba0'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '41f8060e94eb56bb3c5d230d8b7dc349'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3e3956f7e4a89e843080316c1ea3ff9f'), 'format-library.js' => array('dependencies' => array('lodash', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c9654deb47ed294f14ff96151af02331'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '0181cce8c3861eae44439abdc3c37e7a'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c43b49e3f3da377cefdadb0131ba7a31'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a2eb6e6af4832e39a703494f847a2370'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3bb3f6a7a8127b024342e718ad297e81'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => '23a620781734eaba58ba6c330785209c'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '2e2855269d5ab0ab5f2b9f8811e007a4'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '327a5cae1d26e1724881d6f7a9ec32b1'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '6538cb78f3b1fb02725d3d09490e1c12'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => '3b3e946b2d484de31e4be1dc7a48001e'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'cf36cb89f359dbf8a1b1f2bddbd35606'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => '474a4e9edc27fd2d9679d00ef548c966'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '6e6869dc94974fb23e5747bc1cf59e23'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a36cabae37a1aac99726445836474a79'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '455bbe5442bfb84840ff801a9ea5be69'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill'), 'version' => 'ef45226203dde56110939da3aaaa0905'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '110181c4ac96264be701b8a27777b9a2'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3173f285aee099b367ac20385a778615'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '4b20a43e08878013a4cc5812236d6046'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '14dce49ab7da6088abc01bec4529f9d0'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '8cd5499a15fd58371759a3182b50ac33'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f634219101ddcef8327fb62f2bcb6a93'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '5f3b21f75e28874cac2c76a7d05c5e42'));
     2 No newline at end of file
  • tools/webpack/packages.js

    diff --git a/tools/webpack/packages.js b/tools/webpack/packages.js
    index de6ed4a041..57a0c2a5a0 100644
    a b const { DefinePlugin } = require( 'webpack' ); 
    55const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
    66const LiveReloadPlugin = require( 'webpack-livereload-plugin' );
    77const postcss = require( 'postcss' );
    8 const UglifyJS = require( 'uglify-js' );
    9 
    108const { join, basename } = require( 'path' );
    119const { get } = require( 'lodash' );
    1210
    function camelCaseDash( string ) { 
    4139        );
    4240}
    4341
    44 /**
    45  * Maps vendors to copy commands for the CopyWebpackPlugin.
    46  *
    47  * @param {Object} vendors     Vendors to include in the vendor folder.
    48  * @param {string} buildTarget The folder in which to build the packages.
    49  *
    50  * @return {Object[]} Copy object suitable for the CopyWebpackPlugin.
    51  */
    52 function mapVendorCopies( vendors, buildTarget ) {
    53         return Object.keys( vendors ).map( ( filename ) => ( {
    54                 from: join( baseDir, `node_modules/${ vendors[ filename ] }` ),
    55                 to: join( baseDir, `${ buildTarget }/js/dist/vendor/${ filename }` ),
    56         } ) );
    57 }
    58 
    5942module.exports = function( env = { environment: 'production', watch: false, buildTarget: false } ) {
    6043        const mode = env.environment;
    6144        const suffix = mode === 'production' ? '.min' : '';
    module.exports = function( env = { environment: 'production', watch: false, buil 
    7154                )
    7255                .map( ( packageName ) => packageName.replace( WORDPRESS_NAMESPACE, '' ) );
    7356
    74         const vendors = {
    75                 'lodash.js': 'lodash/lodash.js',
    76                 'wp-polyfill.js': '@babel/polyfill/dist/polyfill.js',
    77                 'wp-polyfill-fetch.js': 'whatwg-fetch/dist/fetch.umd.js',
    78                 'wp-polyfill-element-closest.js': 'element-closest/element-closest.js',
    79                 'wp-polyfill-node-contains.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js',
    80                 'wp-polyfill-url.js': 'polyfill-library/polyfills/URL/polyfill.js',
    81                 'wp-polyfill-dom-rect.js': 'polyfill-library/polyfills/DOMRect/polyfill.js',
    82                 'wp-polyfill-formdata.js': 'formdata-polyfill/FormData.js',
    83                 'moment.js': 'moment/moment.js',
    84                 'react.js': 'react/umd/react.development.js',
    85                 'react-dom.js': 'react-dom/umd/react-dom.development.js',
    86         };
    87 
    88         const minifiedVendors = {
    89                 'lodash.min.js': 'lodash/lodash.min.js',
    90                 'wp-polyfill.min.js': '@babel/polyfill/dist/polyfill.min.js',
    91                 'wp-polyfill-formdata.min.js': 'formdata-polyfill/formdata.min.js',
    92                 'moment.min.js': 'moment/min/moment.min.js',
    93                 'react.min.js': 'react/umd/react.production.min.js',
    94                 'react-dom.min.js': 'react-dom/umd/react-dom.production.min.js',
    95         };
    96 
    97         const minifyVendors = {
    98                 'wp-polyfill-fetch.min.js': 'whatwg-fetch/dist/fetch.umd.js',
    99                 'wp-polyfill-element-closest.min.js': 'element-closest/element-closest.js',
    100                 'wp-polyfill-node-contains.min.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js',
    101                 'wp-polyfill-url.min.js': 'polyfill-library/polyfills/URL/polyfill.js',
    102                 'wp-polyfill-dom-rect.min.js': 'polyfill-library/polyfills/DOMRect/polyfill.js',
    103         };
    104 
    10557        const blockNames = [
    10658                'archives',
    10759                'block',
    module.exports = function( env = { environment: 'production', watch: false, buil 
    12880                to: join( baseDir, `${ buildTarget }/blocks/[1]/block.json` ),
    12981        };
    13082
    131         const developmentCopies = mapVendorCopies( vendors, buildTarget );
    132         const minifiedCopies = mapVendorCopies( minifiedVendors, buildTarget );
    133         const minifyCopies = mapVendorCopies( minifyVendors, buildTarget ).map( ( copyCommand ) => {
    134                 return {
    135                         ...copyCommand,
    136                         transform: ( content ) => {
    137                                 return UglifyJS.minify( content.toString() ).code;
    138                         },
    139                 };
    140         } );
    141 
    142         let vendorCopies = mode === "development" ? developmentCopies : [ ...minifiedCopies, ...minifyCopies ];
    143 
    14483        let cssCopies = packages.map( ( packageName ) => ( {
    14584                from: join( baseDir, `node_modules/@wordpress/${ packageName }/build-style/*.css` ),
    14685                to: join( baseDir, `${ buildTarget }/css/dist/${ packageName }/` ),
    module.exports = function( env = { environment: 'production', watch: false, buil 
    250189                        } ),
    251190                        new CopyWebpackPlugin(
    252191                                [
    253                                         ...vendorCopies,
    254192                                        ...cssCopies,
    255193                                        ...phpCopies,
    256194                                        blockMetadataCopies,
  • new file tools/webpack/vendor.js

    diff --git a/tools/webpack/vendor.js b/tools/webpack/vendor.js
    new file mode 100644
    index 0000000000..db34969cf1
    - +  
     1/**
     2 * External dependencies
     3 */
     4const { join } = require( 'path' );
     5
     6module.exports = function( env = { environment: 'production', watch: false, buildTarget: false } ) {
     7        const mode = env.environment;
     8        const suffix = mode === 'production' ? '.min' : '';
     9        const buildTarget = env.buildTarget || ( mode === 'production' ? 'build' : 'src' );
     10
     11        return {
     12                mode,
     13
     14                entry: {
     15                        lodash: 'lodash',
     16                        'wp-polyfill': '@babel/polyfill',
     17                        'wp-polyfill-fetch': 'whatwg-fetch',
     18                        'wp-polyfill-element-closest': 'element-closest',
     19                        'wp-polyfill-node-contains': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js',
     20                        'wp-polyfill-url': 'polyfill-library/polyfills/URL/polyfill.js',
     21                        'wp-polyfill-dom-rect': 'polyfill-library/polyfills/DOMRect/polyfill.js',
     22                        'wp-polyfill-formdata': 'formdata-polyfill',
     23                        'moment': 'moment',
     24                        'react': 'react',
     25                        'react-dom': 'react-dom',
     26                },
     27
     28                output: {
     29                        filename: `[name]${ suffix }.js`,
     30                        path: join( __dirname, `../../${ buildTarget }/wp-includes/js/dist/vendor` ),
     31                },
     32
     33                stats: {
     34                        children: false,
     35                },
     36
     37                watch: env.watch,
     38        };
     39};
  • webpack.config.js

    diff --git a/webpack.config.js b/webpack.config.js
    index bc6ab59bee..c5372a23c9 100644
    a b  
    11const mediaConfig = require( './tools/webpack/media' );
    22const packagesConfig = require( './tools/webpack/packages' );
     3const vendorConfig = require( './tools/webpack/vendor' );
    34
    45module.exports = function( env = { environment: "production", watch: false, buildTarget: false } ) {
    56        if ( ! env.watch ) {
    module.exports = function( env = { environment: "production", watch: false, buil 
    1314        const config = [
    1415                mediaConfig( env ),
    1516                packagesConfig( env ),
     17                vendorConfig( env ),
    1618        ];
    1719
    1820        return config;