UNPKG

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