highlight.js: Webpack error with autoit.js: Maximum call stack size exceeded
I’m not sure if this is a highlight.js problem or webpack, but when webpack attempts to bundle highlight.js version 8.7, it chokes on autoit.js:
ERROR in ../~/highlight.js/lib/languages/autoit.js
Module build failed: Maximum call stack size exceeded
@ ../~/highlight.js/lib/index.js 12:32-61
Had to pin to ~8.6.0 to get around this. Using node 0.10.25.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (5 by maintainers)
Commits related to this issue
- Add a noParse RegExp in order to prevent a maximum call stack size exceeded error for a highlight.js dependency, see isagalaev/highlight.js#895 — committed to mjhasbach/material-qna by mjhasbach 9 years ago
- Fx for Webpack error with autoit.js: Maximum call stack size exceeded https://github.com/isagalaev/highlight.js/issues/895 — committed to andrebalza/wordpress-hybrid-client by andrebalza 9 years ago
- Fix for Webpack error with autoit.js: Maximum call stack size exceeded https://github.com/isagalaev/highlight.js/issues/895 — committed to andrebalza/wordpress-hybrid-client by andrebalza 9 years ago
- Fix issue occuring because of GH issue https://github.com/isagalaev/highlight.js/issues/895 — committed to anildigital/ruby-operators by anildigital 9 years ago
- fix(deps): Add elements-sdk dependency, AND do not parse autoit for highlight.js: https://github.com/isagalaev/highlight.js/issues/895 — committed to Pearson-Higher-Ed/compounds by deleted user 8 years ago
- Fix issue occuring because of GH issue https://github.com/isagalaev/highlight.js/issues/895 — committed to RubyOnWorld/operators by Anthony-3 9 years ago
I resolved it in webpack config file by adding to module.noParse option new RegExp, e.g. like this:
I looked more closely into AutoIt and found out it is simply too big anyway. I reduced the list based on the official docs of the languages which reduced the size of the whole library by about 20% and as a side effect fixed this issue.