diff --git a/babel-preset/configs/hmr.js b/babel-preset/configs/hmr.js index e88e2c67d5be77..3c041e99f92c10 100644 --- a/babel-preset/configs/hmr.js +++ b/babel-preset/configs/hmr.js @@ -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([ @@ -32,4 +32,4 @@ module.exports = function(options, filename) { ] ]) }; -} +};