Files
NativeScript/packages/webpack/style-hot-loader.js
2020-07-12 19:08:49 -07:00

11 lines
418 B
JavaScript

const { reload } = require("./hot-loader-helper");
const { convertToUnixPath } = require("./lib/utils");
module.exports = function (source, map) {
const typeStyle = "style";
const moduleRelativePath = this.resourcePath.replace(this.rootContext, ".");
const modulePath = convertToUnixPath(moduleRelativePath);
this.callback(null, `${source};${reload({ type: typeStyle, path: modulePath })}`, map);
};