Commit f5af532
allow to catch parsing errors (#667)
* allow to catch parsing errors
Now you can see:
```
Error parsing bundle asset "/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/dist/public/index.mjs": Cannot read properties of undefined (reading 'arguments') {
cause: TypeError: Cannot read properties of undefined (reading 'arguments')
at getModulesLocations (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:254:24)
at Object.ExpressionStatement (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:44:35)
at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
at Object.skipThrough (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:186:39)
at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
at base.Program.base.BlockStatement.base.StaticBlock (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:198:7)
at c (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:58:37)
at Object.recursive (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/acorn-walk/dist/walk.js:59:7)
at parseBundle (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/parseUtils.js:26:8)
at Object.getViewerData (/home/alexander-akait/IdeaProjects/webpack-bundle-analyzer-reproducer-409/node_modules/webpack-bundle-analyzer/lib/analyzer.js:87:22)
}
```
Useful for #409 (comment)
* Fix lint
---------
Co-authored-by: Vesa Laakso <[email protected]>1 parent 5d37dc3 commit f5af532
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments