WordPress.org

Make WordPress Core

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

File 49423-vendor-webpack-3.diff, 26.0 KB (added by bookdude13, 19 months ago)

Refreshed patch for #49360

  • package-lock.json

    diff --git package-lock.json package-lock.json
    index f0f5d2a6db..5dcc4b9c76 100644
     
    59145914                },
    59155915                "create-hash": {
    59165916                        "version": "1.2.0",
    5917                         "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
     5917                        "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
    59185918                        "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
    59195919                        "dev": true,
    59205920                        "requires": {
     
    59275927                },
    59285928                "create-hmac": {
    59295929                        "version": "1.1.7",
    5930                         "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
     5930                        "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
    59315931                        "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
    59325932                        "dev": true,
    59335933                        "requires": {
     
    59935993                },
    59945994                "css-color-names": {
    59955995                        "version": "0.0.4",
    5996                         "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
     5996                        "resolved": "http://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
    59975997                        "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=",
    59985998                        "dev": true
    59995999                },
     
    68766876                },
    68776877                "diffie-hellman": {
    68786878                        "version": "5.0.3",
    6879                         "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
     6879                        "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
    68806880                        "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
    68816881                        "dev": true,
    68826882                        "requires": {
     
    1761617616                },
    1761717617                "react-autosize-textarea": {
    1761817618                        "version": "3.0.3",
    17619                         "resolved": "https://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
     17619                        "resolved": "http://registry.npmjs.org/react-autosize-textarea/-/react-autosize-textarea-3.0.3.tgz",
    1762017620                        "integrity": "sha512-iOSZK7RUuJ+iEwkJ9rqYciqtjQgrG1CCRFL6h8Bk61kODnRyEq4tS74IgXpI1t4S6jBBZVm+6ugaU+tWTlVxXg==",
    1762117621                        "requires": {
    1762217622                                "autosize": "^4.0.0",
     
    1901119011                },
    1901219012                "sha.js": {
    1901319013                        "version": "2.4.11",
    19014                         "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
     19014                        "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
    1901519015                        "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
    1901619016                        "dev": true,
    1901719017                        "requires": {
  • package.json

    diff --git package.json package.json
    index 40e873d043..3524044757 100644
     
    6363                "matchdep": "~2.0.0",
    6464                "node-sass": "~4.13.1",
    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 src/wp-includes/assets/script-loader-packages.php src/wp-includes/assets/script-loader-packages.php
    index e2664acefc..589d9f3d31 100644
     
    1 <?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'ad3d7c2ff7ea54382e4899c66c5675c9'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '48114eb6367e31cf8c2be691105838ea'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'e52bd7bfab0d35919427383743b7a404'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'adff248f3b87df7a3b1087ffd7793327'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a7f837f42df02a93992f6c4f45ad7fbc'), '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' => '068dd0d2b939be3a0864abdeab63a37d'), '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' => '1bfa62a66aca9e68c9639700114f6c39'), '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-dom', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '5b8ce5cb95f0577c1cb86e54ae17b3c3'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'fe524f460fe556f172152f73033c8c80'), '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' => 'deb94d23a15b02ce6040739de855fadc'), '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' => '6dfb8d1e51825c15aac657c35eaa89f8'), 'compose.js' => array('dependencies' => array('lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '3841bc74afa8586ce2a8b0ec77a3acae'), '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' => '99db1d3b8ca92793a66af658575db6b0'), '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' => '32b7c0f92de0b7e9b3fc89c14c54d931'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => 'a2f0aa61a593b969b3fba106032adff0'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '3c90e59a038022f147c756f5b72296bd'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '26aefabb46263ab5dac6d7f6c63b664c'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3df277847d8933e5ff2c5f219d945539'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a6586b64552c9c6924b8093e9ef4f74e'), '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' => '7e5d727034cbe81bb2e9393bc9e524ef'), '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' => 'cc0e1cfe5c226fd06e3ff8eeb1c2c9fc'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '9d584fa92b66aae8cf17d7fae2374ec6'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11a9ed20aa0e5b49a24e416455d2311e'), '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' => '93f4f66d840b294e177d9f971427e91b'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b43453fa1a44a838c0e55d716ce3a06'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '19282cf2c91bc955d53065ce1caef093'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b2dcfa96f78efadf5bcac20a83d7fbee'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c340b2f09372480c2b25ac881d5b70ba'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a4fad8f7a8750ea9a39e794e86e87628'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '8ca127c5f0db5120f5507b72db853279'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bb7e54e4df3002040a4c8090db5fa41c'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '3b68f08e45744a637a197107cf36ef83'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'cefe435de0dce018f53148ad6982d0ff'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'eaf1b86e522a336a5c013e70e1d3f699'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => 'ad448a31fe0b7c76c485caa01d4e831f'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '2e7d955b235f3f757927ecc4e82776a7'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '338f399d1b80290391a80c3c9e5349b0'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '403b34f9b8d11aad63bb3475e260a9d6'), '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' => '03d63fb4d946b4dc4b2f60d9afc35fe5'), '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' => '3da2c3d069de569cb0f0cbf94370b2e5'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '9090d8c46c6ce101967092e0a195bb32'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'a1f31c40d19f26a299d2a2b747ded3a5'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '47e21c620824d1f18a1a1f4db20499ae'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '83b3d32a6d196079babcbb2fa7f67523'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '202ac16e99afe7c33c257b248625a947'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '2022e3c957d364d30c905c4acd42f40c'));
    2  No newline at end of file
     1<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => 'ad3d7c2ff7ea54382e4899c66c5675c9'), 'annotations.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '48114eb6367e31cf8c2be691105838ea'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'e52bd7bfab0d35919427383743b7a404'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'adff248f3b87df7a3b1087ffd7793327'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a7f837f42df02a93992f6c4f45ad7fbc'), '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' => '068dd0d2b939be3a0864abdeab63a37d'), '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' => '1bfa62a66aca9e68c9639700114f6c39'), '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-dom', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '5b8ce5cb95f0577c1cb86e54ae17b3c3'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'fe524f460fe556f172152f73033c8c80'), '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' => 'deb94d23a15b02ce6040739de855fadc'), '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' => '648b6ca754f0a32153d14025a0978a97'), 'compose.js' => array('dependencies' => array('lodash', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '3841bc74afa8586ce2a8b0ec77a3acae'), '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' => '99db1d3b8ca92793a66af658575db6b0'), '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' => '32b7c0f92de0b7e9b3fc89c14c54d931'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-polyfill'), 'version' => 'a2f0aa61a593b969b3fba106032adff0'), 'date.js' => array('dependencies' => array('moment', 'wp-polyfill'), 'version' => '3c90e59a038022f147c756f5b72296bd'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '26aefabb46263ab5dac6d7f6c63b664c'), 'dom.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '3df277847d8933e5ff2c5f219d945539'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'a6586b64552c9c6924b8093e9ef4f74e'), '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' => '7e5d727034cbe81bb2e9393bc9e524ef'), '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' => 'cc0e1cfe5c226fd06e3ff8eeb1c2c9fc'), 'element.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '9d584fa92b66aae8cf17d7fae2374ec6'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => '11a9ed20aa0e5b49a24e416455d2311e'), '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' => '93f4f66d840b294e177d9f971427e91b'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b43453fa1a44a838c0e55d716ce3a06'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => '19282cf2c91bc955d53065ce1caef093'), 'i18n.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'b2dcfa96f78efadf5bcac20a83d7fbee'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c340b2f09372480c2b25ac881d5b70ba'), 'keyboard-shortcuts.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a4fad8f7a8750ea9a39e794e86e87628'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '8ca127c5f0db5120f5507b72db853279'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bb7e54e4df3002040a4c8090db5fa41c'), 'media-utils.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '3b68f08e45744a637a197107cf36ef83'), 'notices.js' => array('dependencies' => array('lodash', 'wp-data', 'wp-polyfill'), 'version' => 'cefe435de0dce018f53148ad6982d0ff'), 'nux.js' => array('dependencies' => array('lodash', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'eaf1b86e522a336a5c013e70e1d3f699'), 'plugins.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill'), 'version' => 'ad448a31fe0b7c76c485caa01d4e831f'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '2e7d955b235f3f757927ecc4e82776a7'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '338f399d1b80290391a80c3c9e5349b0'), 'redux-routine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '403b34f9b8d11aad63bb3475e260a9d6'), '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' => '03d63fb4d946b4dc4b2f60d9afc35fe5'), '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' => '3da2c3d069de569cb0f0cbf94370b2e5'), 'shortcode.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '9090d8c46c6ce101967092e0a195bb32'), 'token-list.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'a1f31c40d19f26a299d2a2b747ded3a5'), 'url.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '47e21c620824d1f18a1a1f4db20499ae'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '83b3d32a6d196079babcbb2fa7f67523'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => '202ac16e99afe7c33c257b248625a947'), 'wordcount.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '2022e3c957d364d30c905c4acd42f40c'));
     2 No newline at end of file
  • tools/webpack/packages.js

    diff --git tools/webpack/packages.js tools/webpack/packages.js
    index 6867c47c91..bf00cdec32 100644
    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' );
    98
    109const { join, basename } = require( 'path' );
    1110const { get } = require( 'lodash' );
    function camelCaseDash( string ) { 
    4140        );
    4241}
    4342
    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 }
    5843
    5944module.exports = function( env = { environment: 'production', watch: false, buildTarget: false } ) {
    6045        const mode = env.environment;
    module.exports = function( env = { environment: 'production', watch: false, buil 
    7156                )
    7257                .map( ( packageName ) => packageName.replace( WORDPRESS_NAMESPACE, '' ) );
    7358
    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': 'core-js-url-browser/url.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                 'wp-polyfill-url.min.js': 'core-js-url-browser/url.min.js',
    93                 'moment.min.js': 'moment/min/moment.min.js',
    94                 'react.min.js': 'react/umd/react.production.min.js',
    95                 'react-dom.min.js': 'react-dom/umd/react-dom.production.min.js',
    96         };
    97 
    98         const minifyVendors = {
    99                 'wp-polyfill-fetch.min.js': 'whatwg-fetch/dist/fetch.umd.js',
    100                 'wp-polyfill-element-closest.min.js': 'element-closest/element-closest.js',
    101                 'wp-polyfill-node-contains.min.js': 'polyfill-library/polyfills/Node/prototype/contains/polyfill.js',
    102                 'wp-polyfill-dom-rect.min.js': 'polyfill-library/polyfills/DOMRect/polyfill.js',
    103         };
    104 
    10559        const blockNames = [
    10660                'archives',
    10761                'block',
    module.exports = function( env = { environment: 'production', watch: false, buil 
    12882                to: join( baseDir, `${ buildTarget }/blocks/[1]/block.json` ),
    12983        };
    13084
    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 
    14485        let cssCopies = packages.map( ( packageName ) => ( {
    14586                from: join( baseDir, `node_modules/@wordpress/${ packageName }/build-style/*.css` ),
    14687                to: join( baseDir, `${ buildTarget }/css/dist/${ packageName }/` ),
    module.exports = function( env = { environment: 'production', watch: false, buil 
    250191                        } ),
    251192                        new CopyWebpackPlugin(
    252193                                [
    253                                         ...vendorCopies,
    254194                                        ...cssCopies,
    255195                                        ...phpCopies,
    256196                                        blockMetadataCopies,
  • new file tools/webpack/vendor.js

    diff --git tools/webpack/vendor.js tools/webpack/vendor.js
    new file mode 100644
    index 0000000000..25ab7bf50d
    - +  
     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': 'core-js-url-browser',
     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 webpack.config.js webpack.config.js
    index bc6ab59bee..c5372a23c9 100644
     
    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;