Skip to content
Open
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
9 changes: 9 additions & 0 deletions .changeset/remove-bundled-entrypoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@patternfly/elements": major
---

Removed the bundled entrypoint (`pfe.min.js`). Import individual
elements directly instead, e.g. `import '@patternfly/elements/pf-button/pf-button.js'`.

The bundled entrypoint caused custom element double-registration issues
and is not recommended for production use.
11 changes: 0 additions & 11 deletions docs/_plugins/pfe-assets.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,10 @@ function demoPaths(content) {
}
}

/** Generate a single-file bundle of all the repo's components and their dependencies */
async function bundle() {
const { bundle } = await import('../../scripts/bundle.js');
await bundle();
}

module.exports = {
configFunction(eleventyConfig, options) {
eleventyConfig.addPassthroughCopy('docs/images/favicon.ico');
eleventyConfig.addPassthroughCopy('docs/bundle.{js,map,ts}');
eleventyConfig.addPassthroughCopy('docs/pfe.min.{map,css}');
eleventyConfig.addPassthroughCopy({ 'elements/pfe.min.*': '/' } );
eleventyConfig.addPassthroughCopy('docs/demo.{js,map,ts}');
eleventyConfig.addPassthroughCopy('docs/main.mjs');
eleventyConfig.addPassthroughCopy({
Expand All @@ -93,8 +85,5 @@ module.exports = {
// The demo files are written primarily for the dev SPA (`npm start`),
// so here we transform the paths found in those files to match the docs site's file structure
eleventyConfig.addTransform('demo-paths', demoPaths);

// create /docs/pfe.min.js
eleventyConfig.on('eleventy.before', () => bundle(options));
},
};
2 changes: 0 additions & 2 deletions elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
"description": "PatternFly Elements",
"customElements": "custom-elements.json",
"type": "module",
"main": "./pfe.min.js",
"module": "./pfe.js",
"types": "./pfe.d.ts",
"exports": {
".": "./pfe.min.js",
"./form-control.css": "./form-control.css",
"./form-control.css.js": "./form-control.css.js",
"./pf-accordion/pf-accordion-header.js": "./pf-accordion/pf-accordion-header.js",
Expand Down
17 changes: 1 addition & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"build:lightdom",
"build:elements",
"build:create",
"build:bundle",

"build:react"
]
},
Expand Down Expand Up @@ -137,21 +137,6 @@
"core/**/*.tsbuildinfo"
]
},
"build:bundle": {
"command": "node scripts/bundle.js",
"dependencies": [
"build:core"
],
"files": [
"elements/**/*.ts",
"elements/**/*.css",
"core/**/*.ts",
"scripts/bundle.js"
],
"output": [
"elements/pfe.min.js"
]
},
"build:react": {
"command": "npx tsx scripts/generate-react-wrappers.ts",
"dependencies": [
Expand Down
66 changes: 0 additions & 66 deletions scripts/bundle.js

This file was deleted.

Loading