Skip to content

Commit

Permalink
Update WP external packages
Browse files Browse the repository at this point in the history
  • Loading branch information
irshadahmad21 committed Nov 24, 2024
1 parent f1aaaf7 commit 60c1439
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/vite-wp-react/src/utils/wp-packages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { dashToCamelCase } from './dash-to-camel-case.js';

/**
* WordPress packages that are bundled.
*
* The list is the output of this snippet:
*
$assets = include ABSPATH . WPINC . '/assets/script-loader-packages.php';
print json_encode(
array_map(
fn( $asset ) => str_replace( '.js', '', $asset ),
array_keys( $assets )
),
JSON_PRETTY_PRINT
);
*/
export const WP_PACKAGES: Record<string, string> = Object.fromEntries(
[
'a11y',
Expand All @@ -12,8 +26,10 @@ export const WP_PACKAGES: Record<string, string> = Object.fromEntries(
'block-library',
'block-serialization-default-parser',
'blocks',
'commands',
'components',
'compose',
'core-commands',
'core-data',
'customize-widgets',
'data',
Expand All @@ -39,14 +55,17 @@ export const WP_PACKAGES: Record<string, string> = Object.fromEntries(
'media-utils',
'notices',
'nux',
'patterns',
'plugins',
'preferences',
'preferences-persistence',
'primitives',
'priority-queue',
'private-apis',
'redux-routine',
'reusable-blocks',
'rich-text',
'router',
'server-side-render',
'shortcode',
'style-engine',
Expand Down

0 comments on commit 60c1439

Please sign in to comment.