rspack_plugin_css 0.103.1

rspack css plugin
Documentation
link = document.createElement("link");
<% if (_with_hmr) { %>
// Browsers may hide the nonce attribute while retaining its property.
var nonce = <%- weak(SCRIPT_NONCE) %> || (hmr && hmr.nonce);
if (nonce) link.setAttribute("nonce", nonce);
<% } else { %>
if (<%- weak(SCRIPT_NONCE) %>) {
  link.setAttribute("nonce", <%- weak(SCRIPT_NONCE) %>);
}
<% } %>
<% if (_unique_name != "") { %>
link.setAttribute("data-rspack", cssLoadingUniqueName + ":" + key);
<% } %>
<% if (_with_fetch_priority) { %>
if (fetchPriority) {
  link.setAttribute("fetchpriority", fetchPriority);
}
<% } %>
link.setAttribute(loadingAttribute, 1);
link.rel = "stylesheet";
link.href = url;
<% if (_cross_origin == "use-credentials") { %>
link.crossOrigin = "use-credentials";
<% } else if (_cross_origin != "") { %>
if (link.href.indexOf(window.location.origin + '/') !== 0) {
  link.crossOrigin = '<%- _cross_origin %>';
}
<% } %>
<% if (_with_hmr) { %>
if (hmr) {
	var attributes = hmr.attributes;
	for (var i = 0, length = attributes.length; i < length; i++) {
		var attribute = attributes[i];
		switch (attribute.name) {
			case "href": case "integrity": case "disabled": case "nonce":
			case "onload": case "onerror": case "data-rspack": case "data-rspack-loading":
				break;
			default:
				link.setAttribute(attribute.name, attribute.value);
		}
	}
}
<% } %>