Skip to content

Commit f52a1cf

Browse files
committed
Merge pull request element-hq#1277 from vector-im/rav/no_parse_languages
Tell webpack not to parse the highlight.js languages
2 parents 0ddb2cf + c5c5e6d commit f52a1cf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎webpack.config.js‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ module.exports = {
1414
{ test: /\.js$/, loader: "babel", include: path.resolve('./src') },
1515
// css-raw-loader loads CSS but doesn't try to treat url()s as require()s
1616
{ test: /\.css$/, loader: ExtractTextPlugin.extract("css-raw-loader") },
17-
]
17+
],
18+
noParse: [
19+
// don't parse the languages within highlight.js. They cause stack
20+
// overflows (https://github.com/webpack/webpack/issues/1721), and
21+
// there is no need for webpack to parse them - they can just be
22+
// included as-is.
23+
/highlight\.js\/lib\/languages/,
24+
],
1825
},
1926
output: {
2027
devtoolModuleFilenameTemplate: function(info) {

0 commit comments

Comments
 (0)