Skip to content

Commit 08fb20a

Browse files
committed
use a character class for brevity
add a comment so this madness has meaning Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent dd7f9e2 commit 08fb20a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎webpack.config.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,18 @@ module.exports = {
4747
},
4848
],
4949
noParse: [
50+
// for cross platform compatibility use [\\\/] as the path separator
51+
// this ensures that the regex trips on both Windows and *nix
52+
5053
// don't parse the languages within highlight.js. They cause stack
5154
// overflows (https://github.com/webpack/webpack/issues/1721), and
5255
// there is no need for webpack to parse them - they can just be
5356
// included as-is.
54-
/highlight\.js\/lib\/languages/,
55-
/highlight\.js\\lib\\languages/,
57+
/highlight\.js[\\\/]lib[\\\/]languages/,
5658

5759
// olm takes ages for webpack to process, and it's already heavily
5860
// optimised, so there is little to gain by us uglifying it.
59-
/olm\/(javascript\/)?olm\.js$/,
60-
/olm\\(javascript\\)?olm\.js$/,
61+
/olm[\\\/](javascript[\\\/])?olm\.js$/,
6162
],
6263
},
6364
output: {

0 commit comments

Comments
 (0)