UNPKG

421 BJavaScriptView Raw
1const { reload } = require("./hot-loader-helper");
2const { convertToUnixPath } = require("./lib/utils");
3
4module.exports = function (source, map) {
5 const typeMarkup = "markup";
6 const moduleRelativePath = this.resourcePath.replace(this.rootContext, ".");
7 const modulePath = convertToUnixPath(moduleRelativePath);
8
9 this.callback(null, `${source};${reload({ type: typeMarkup, path: modulePath })}`, map);
10};