Skip to content

Commit 25f2617

Browse files
authored
feat!: remove bundled entrypoint (pfe.min.js) (#3089)
* feat!: remove bundled entrypoint (pfe.min.js) The bundled entrypoint causes custom element double-registration issues and is not the recommended way to consume the library. Closes #3087 Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove bundle references from docs plugin Remove the bundle() call and pfe.min.* passthrough copies from the Eleventy docs plugin, since the bundled entrypoint was removed. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove trailing blank line in pfe-assets plugin Fixes padded-blocks lint error. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1377f14 commit 25f2617

5 files changed

Lines changed: 10 additions & 95 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@patternfly/elements": major
3+
---
4+
5+
Removed the bundled entrypoint (`pfe.min.js`). Import individual
6+
elements directly instead, e.g. `import '@patternfly/elements/pf-button/pf-button.js'`.
7+
8+
The bundled entrypoint caused custom element double-registration issues
9+
and is not recommended for production use.

docs/_plugins/pfe-assets.cjs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,10 @@ function demoPaths(content) {
6363
}
6464
}
6565

66-
/** Generate a single-file bundle of all the repo's components and their dependencies */
67-
async function bundle() {
68-
const { bundle } = await import('../../scripts/bundle.js');
69-
await bundle();
70-
}
71-
7266
module.exports = {
7367
configFunction(eleventyConfig, options) {
7468
eleventyConfig.addPassthroughCopy('docs/images/favicon.ico');
7569
eleventyConfig.addPassthroughCopy('docs/bundle.{js,map,ts}');
76-
eleventyConfig.addPassthroughCopy('docs/pfe.min.{map,css}');
77-
eleventyConfig.addPassthroughCopy({ 'elements/pfe.min.*': '/' } );
7870
eleventyConfig.addPassthroughCopy('docs/demo.{js,map,ts}');
7971
eleventyConfig.addPassthroughCopy('docs/main.mjs');
8072
eleventyConfig.addPassthroughCopy({
@@ -93,8 +85,5 @@ module.exports = {
9385
// The demo files are written primarily for the dev SPA (`npm start`),
9486
// so here we transform the paths found in those files to match the docs site's file structure
9587
eleventyConfig.addTransform('demo-paths', demoPaths);
96-
97-
// create /docs/pfe.min.js
98-
eleventyConfig.on('eleventy.before', () => bundle(options));
9988
},
10089
};

elements/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
"description": "PatternFly Elements",
66
"customElements": "custom-elements.json",
77
"type": "module",
8-
"main": "./pfe.min.js",
98
"module": "./pfe.js",
109
"types": "./pfe.d.ts",
1110
"exports": {
12-
".": "./pfe.min.js",
1311
"./form-control.css": "./form-control.css",
1412
"./form-control.css.js": "./form-control.css.js",
1513
"./pf-accordion/pf-accordion-header.js": "./pf-accordion/pf-accordion-header.js",

package.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"build:lightdom",
5656
"build:elements",
5757
"build:create",
58-
"build:bundle",
58+
5959
"build:react"
6060
]
6161
},
@@ -137,21 +137,6 @@
137137
"core/**/*.tsbuildinfo"
138138
]
139139
},
140-
"build:bundle": {
141-
"command": "node scripts/bundle.js",
142-
"dependencies": [
143-
"build:core"
144-
],
145-
"files": [
146-
"elements/**/*.ts",
147-
"elements/**/*.css",
148-
"core/**/*.ts",
149-
"scripts/bundle.js"
150-
],
151-
"output": [
152-
"elements/pfe.min.js"
153-
]
154-
},
155140
"build:react": {
156141
"command": "npx tsx scripts/generate-react-wrappers.ts",
157142
"dependencies": [

scripts/bundle.js

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)