From 048632d96fdc2e25716a17b3f9abe1ea682340e3 Mon Sep 17 00:00:00 2001 From: Dieter Gribnitz Date: Wed, 18 May 2016 21:25:01 +0200 Subject: [PATCH 1/2] Update loader.js Allow you to specity rel attribute to the the place the css file thinks it is. --- lib/loader.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/loader.js b/lib/loader.js index 7574ba15..7f0952db 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -14,6 +14,7 @@ module.exports = function(content, map) { var callback = this.async(); var query = loaderUtils.parseQuery(this.query); var root = query.root; + var rel = query.rel; var moduleMode = query.modules || query.module; var camelCaseKeys = query.camelCase || query.camelcase; @@ -81,6 +82,9 @@ module.exports = function(content, map) { url.substr(idx); } urlRequest = url; + if(!(/^(?:\/|[a-z0-9]+:\/\/)/.test(urlRequest)) && typeof rel !== 'undefined' ) { + urlRequest = rel + "/" + urlRequest; + } return "\" + require(" + loaderUtils.stringifyRequest(this, urlRequest) + ") + \""; }.bind(this)); } From 41353e350e98130ef3ceba12df8285555c3c129c Mon Sep 17 00:00:00 2001 From: Dieter Gribnitz Date: Thu, 13 Jul 2017 06:38:08 +0200 Subject: [PATCH 2/2] --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3091757a..a4d4249b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -coverage \ No newline at end of file +coverage +/nbproject/private/ \ No newline at end of file