We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d54d59 commit c1680d0Copy full SHA for c1680d0
index.js
@@ -1,8 +1,9 @@
1
const mix = require("laravel-mix");
2
const path = require("path");
3
4
+// Determine system directory separator
5
+const slash = `\\${path.sep}`;
6
const escapeRegExp = (str) => str.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
-const slashPattern = `\\${path.sep}`;
7
8
/**
9
* Babel-transpile dependencies inside `node_modules`
@@ -84,9 +85,7 @@ class TranspileNodeModules {
84
85
return /node_modules/;
86
} else {
87
const includeModules = transpile.map(escapeRegExp).join("|");
- return new RegExp(
88
- `node_modules${slashPattern}(?!(${includeModules})${slashPattern})`
89
- );
+ return new RegExp(`node_modules${slash}(?!(${includeModules})${slash})`);
90
}
91
92
0 commit comments