Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 22, 2019
1 parent 04e9bb2 commit 313a5a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions babel.config.js
Expand Up @@ -88,6 +88,8 @@ module.exports = function(api) {
version: require(babelRuntimePkgPath).version,
absoluteRuntime: path.dirname(babelRuntimePkgPath).replace(/\\/g, "/"),
};

console.log("OPTS", transformRuntimeOptions);
}

const config = {
Expand Down
6 changes: 3 additions & 3 deletions packages/babel-plugin-transform-runtime/src/index.js
Expand Up @@ -10,9 +10,9 @@ import { typeAnnotationToString } from "./helpers";

function resolveAbsoluteRuntime(moduleName: string, dirname: string) {
try {
return path.dirname(
resolve.sync(`${moduleName}/package.json`, { basedir: dirname }),
);
return path
.dirname(resolve.sync(`${moduleName}/package.json`, { basedir: dirname }))
.replace(/\\/g, "/");
} catch (err) {
if (err.code !== "MODULE_NOT_FOUND") throw err;

Expand Down

0 comments on commit 313a5a7

Please sign in to comment.