Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/block-library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- Removed the `@wordpress/block-library/babel-plugin` export. It was an internal transform for stripping experimental blocks from WordPress core builds and is no longer used by Gutenberg's build process ([#79162](https://github.com/WordPress/gutenberg/pull/79162)).

### Enhancements

- Icon Block: Insert with a default icon instead of an empty placeholder ([#79111](https://github.com/WordPress/gutenberg/pull/79111)).
Expand Down
150 changes: 0 additions & 150 deletions packages/block-library/babel-plugin.cjs

This file was deleted.

5 changes: 1 addition & 4 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"build-module",
"build-style",
"build-types",
"*.md",
"babel-plugin.cjs"
"*.md"
],
"main": "build/index.cjs",
"module": "build-module/index.mjs",
Expand All @@ -38,7 +37,6 @@
"import": "./build-module/index.mjs",
"require": "./build/index.cjs"
},
"./babel-plugin": "./babel-plugin.cjs",
"./build-module/*": "./build-module/*",
"./build-style/*": "./build-style/*",
"./package.json": "./package.json"
Expand Down Expand Up @@ -144,7 +142,6 @@
"uuid": "^14.0.0"
},
"devDependencies": {
"@babel/core": "^7.25.7",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
Expand Down
13 changes: 4 additions & 9 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ import HtmlRenderer from './utils/html-renderer';
/**
* Internal dependencies
*/
// When IS_GUTENBERG_PLUGIN is set to false, imports of experimental blocks
// are transformed by packages/block-library/src/index.js as follows:
// import * as experimentalBlock from './experimental-block'
// becomes
// const experimentalBlock = null;
// This enables webpack to eliminate the experimental blocks code from the
// production build to make the final bundle smaller.
//
// See https://github.com/WordPress/gutenberg/pull/40655 for more context.
// Experimental blocks are only registered in the Gutenberg plugin (see
// `__experimentalRegisterExperimentalCoreBlocks`). `registerCoreBlocks`
// filters them out via `isBlockMetadataExperimental`, so they are never
// available in WordPress core regardless of what ends up in the bundle.
import * as accordion from './accordion';
import * as accordionItem from './accordion-item';
import * as accordionHeading from './accordion-heading';
Expand Down
67 changes: 0 additions & 67 deletions packages/block-library/test/babel-plugin.js

This file was deleted.

17 changes: 0 additions & 17 deletions tools/build-scripts/babel.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
* Babel project-wide config for the monorepo. Owned by this workspace so all
* babel-related dependencies live here rather than at the repo root.
*/
const path = require( 'node:path' );

const ROOT_DIR = path.resolve( __dirname, '../..' );

module.exports = ( api ) => {
api.cache( true );

Expand All @@ -15,18 +11,5 @@ module.exports = ( api ) => {
require.resolve( '@emotion/babel-plugin' ),
require.resolve( 'babel-plugin-inline-json-import' ),
],
overrides: [
{
test: path.join(
ROOT_DIR,
'packages/block-library/src/index.js'
),
plugins: [
require.resolve(
'../../packages/block-library/babel-plugin.cjs'
),
],
},
],
};
};
Loading