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