From 52543a605818b44169e287bf7077782df51cf402 Mon Sep 17 00:00:00 2001 From: Floris Bernard Date: Wed, 24 Jul 2019 16:52:16 +0200 Subject: [PATCH] Check for backwards slashes in module regex Check for both backwards and forwards slashes so the regex matches paths found by windows as well. --- packages/core-js-compat/src/build-entries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-js-compat/src/build-entries.js b/packages/core-js-compat/src/build-entries.js index f5ae519db06f..2078aedbba3a 100644 --- a/packages/core-js-compat/src/build-entries.js +++ b/packages/core-js-compat/src/build-entries.js @@ -7,7 +7,7 @@ const data = require('./data'); const order = Object.keys(data); function getModulesForEntryPoint(entry) { - const match = entry.match(/\/modules\/([^/]+)$/); + const match = entry.match(/[/\\]modules[/\\]([^/\\]+)$/); if (match) return [match[1]]; const name = require.resolve(entry); const result = [];