mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
Fix regular expressions on Windows (Fixes #3)
This commit is contained in:
parent
5569d6fa18
commit
92ea8b5d76
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
|
@ -145,7 +145,7 @@ function createPlugins(workers, outputPath) {
|
|||
|
||||
function createContextPlugin(filePath, contextPaths) {
|
||||
return new webpack.ContextReplacementPlugin(
|
||||
new RegExp(`^${path.dirname(filePath)}$`),
|
||||
new RegExp(`^${path.dirname(filePath).replace(/[\/\\]/g, '(/|\\\\)')}$`),
|
||||
'',
|
||||
contextPaths
|
||||
);
|
||||
|
|
@ -154,7 +154,7 @@ function createContextPlugin(filePath, contextPaths) {
|
|||
function createIgnoreImportsPlugin(targetPath, ignoredModules) {
|
||||
return new webpack.IgnorePlugin(
|
||||
new RegExp(`^(${ignoredModules.map((id) => `(${id})`).join('|')})$`),
|
||||
new RegExp(`^${path.dirname(targetPath)}$`)
|
||||
new RegExp(`^${path.dirname(targetPath).replace(/[\/\\]/g, '(/|\\\\)')}$`)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue