Skip to content

Commit 34eec1b

Browse files
docs: add Jenkins CSP troubleshooting for blank static reports (#724)
Document that sandboxed Jenkins iframes block report scripts and point to the CSP workaround in issue #168.
1 parent 83a8ee5 commit 34eec1b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ No bundles were parsed. Analyzer will show only original module sizes from stats
211211

212212
To get more information about it you can read [issue #147](https://github.com/webpack/webpack-bundle-analyzer/issues/147).
213213

214+
### Cannot display report in Jenkins due to sandboxed iframe
215+
216+
When viewing a static HTML report through Jenkins (for example with the HTML Publisher plugin), the page can appear blank. Jenkins serves HTML inside a sandboxed iframe that blocks scripts by default, and the report needs JavaScript to render.
217+
218+
This is a Jenkins Content Security Policy restriction, not a bug in webpack-bundle-analyzer. To view the report you need to relax Jenkins CSP for Directory Browser Support. See [issue #168](https://github.com/webpack/webpack-bundle-analyzer/issues/168#issuecomment-381748354) for details and an example `hudson.model.DirectoryBrowserSupport.CSP` setting.
219+
214220
<h2 align="center">Other tools</h2>
215221

216222
- [Statoscope](https://github.com/smelukov/statoscope/blob/master/packages/ui-webpack/README.md) - Webpack bundle analyzing tool to find out why a certain module was bundled (and more features, including interactive treemap)

0 commit comments

Comments
 (0)