diff --git a/markup-hot-loader.js b/markup-hot-loader.js index 601cb16f..a05412ef 100644 --- a/markup-hot-loader.js +++ b/markup-hot-loader.js @@ -2,6 +2,6 @@ const { reload } = require("./hot-loader-helper"); module.exports = function (source) { const typeMarkup = "markup"; - const modulePath = this.resourcePath.replace(this.context, "."); + const modulePath = this.resourcePath.replace(this.rootContext, "."); return `${source};${reload({ type: typeMarkup, module: modulePath })}`; }; diff --git a/script-hot-loader.js b/script-hot-loader.js index 7f59aaaa..85a16eb1 100644 --- a/script-hot-loader.js +++ b/script-hot-loader.js @@ -2,6 +2,6 @@ const { reload } = require("./hot-loader-helper"); module.exports = function (source) { const typeScript = "script"; - const modulePath = this.resourcePath.replace(this.context, "."); + const modulePath = this.resourcePath.replace(this.rootContext, "."); return `${source};${reload({ type: typeScript, module: modulePath })}`; }; diff --git a/style-hot-loader.js b/style-hot-loader.js index 90fd5ce8..8a0a32e7 100644 --- a/style-hot-loader.js +++ b/style-hot-loader.js @@ -2,6 +2,6 @@ const { reload } = require("./hot-loader-helper"); module.exports = function (source) { const typeStyle = "style"; - const modulePath = this.resourcePath.replace(this.context, "."); + const modulePath = this.resourcePath.replace(this.rootContext, "."); return `${source};${reload({ type: typeStyle, module: modulePath })}`; };