Skip to content

Commit

Permalink
Fix HMR preset config path
Browse files Browse the repository at this point in the history
Reviewed By: davidaurelio

Differential Revision: D3077935

fb-gh-sync-id: b1e89f9e34a505f0611cf8991afe4224d5a6f05d
shipit-source-id: b1e89f9e34a505f0611cf8991afe4224d5a6f05d
  • Loading branch information
martinbigio authored and Facebook Github Bot 8 committed Mar 21, 2016
1 parent dfce55a commit 3a1634e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions babel-preset/configs/hmr.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var transformPath = require.resolve(hmrTransform);

module.exports = function(options, filename) {
var transform = filename
? path.relative(path.dirname(filename), transformPath) // packager can't handle absolute paths
? './' + path.relative(path.dirname(filename), transformPath) // packager can't handle absolute paths
: hmrTransform;
return {
plugins: resolvePlugins([
Expand All @@ -32,4 +32,4 @@ module.exports = function(options, filename) {
]
])
};
}
};

0 comments on commit 3a1634e

Please sign in to comment.