You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ESM build (dist/index.es.js, dist/quickstarts-full.es.js) of @patternfly/quickstarts@6.6.0 contains untranspiled CommonJS require('dompurify') calls, coming from the markdown sanitizer code (the admonition/accordion hooks around markdown-it + DOMPurify). There are at least 3 occurrences, e.g.:
The ESM bundle should be pure ESM (import/export), so bundlers that don't transform mixed modules can consume it.
Actual behavior
Since the file is marked ESM, Vite/Rollup do not run @rollup/plugin-commonjs on it (transformMixedEsModules is off by default), and the raw require() calls ship to the browser, causing:
ReferenceError: require is not defined
at runtime. In our case this crashed Chromatic's story-extraction step when our Storybook (Vite builder) included @patternfly/quickstarts.
Activity