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, "/"); }