From d9a0ca185d1b20d7c304f8b258e2e982f5255601 Mon Sep 17 00:00:00 2001 From: Mattias Ekstrand Date: Thu, 20 Jan 2022 14:19:32 +0100 Subject: [PATCH 1/2] Normalized file path (#14185) --- .../src/get-runtime-path/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-transform-runtime/src/get-runtime-path/index.ts b/packages/babel-plugin-transform-runtime/src/get-runtime-path/index.ts index 28f6d7a82197..37fdc83a6827 100644 --- a/packages/babel-plugin-transform-runtime/src/get-runtime-path/index.ts +++ b/packages/babel-plugin-transform-runtime/src/get-runtime-path/index.ts @@ -34,5 +34,5 @@ function resolveAbsoluteRuntime(moduleName: string, dirname: string) { } export function resolveFSPath(path) { - return require.resolve(path); + return require.resolve(path).replace(/\\/g, "/"); } From c6d038d98f77338865c7e72bb3456d2d1443a582 Mon Sep 17 00:00:00 2001 From: Babel Bot Date: Thu, 20 Jan 2022 18:26:22 +0000 Subject: [PATCH 2/2] Update fixtures (Windows) --- .../test/fixtures/windows/absoluteRuntime/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-transform-runtime/test/fixtures/windows/absoluteRuntime/output.js b/packages/babel-plugin-transform-runtime/test/fixtures/windows/absoluteRuntime/output.js index b21448b570a6..452420d4b63b 100644 --- a/packages/babel-plugin-transform-runtime/test/fixtures/windows/absoluteRuntime/output.js +++ b/packages/babel-plugin-transform-runtime/test/fixtures/windows/absoluteRuntime/output.js @@ -1,4 +1,4 @@ -var _asyncToGenerator = require("\\packages\\babel-runtime\\helpers\\asyncToGenerator.js"); +var _asyncToGenerator = require("/packages/babel-runtime/helpers/asyncToGenerator.js"); function test() { return _test.apply(this, arguments);