diff --git a/src/lib/resolve-url.html b/src/lib/resolve-url.html
index 74fc5f43fc..ac90f2734a 100644
--- a/src/lib/resolve-url.html
+++ b/src/lib/resolve-url.html
@@ -94,7 +94,8 @@
};
// NOTE: IE11 does not support baseURI
- Polymer.rootPath = pathFromUrl(document.baseURI || window.location.href);
+ Polymer.rootPath = Polymer.Settings.rootPath ||
+ pathFromUrl(document.baseURI || window.location.href);
})();
diff --git a/src/mini/template.html b/src/mini/template.html
index ca9587e29f..06cc31cde6 100644
--- a/src/mini/template.html
+++ b/src/mini/template.html
@@ -31,15 +31,15 @@
module = Polymer.DomModule.import(this.is);
this._template = module && module.querySelector('template');
}
- if (!this._importPath) {
- if (module) {
- var assetPath = module.getAttribute('assetpath') || '';
- var importURL = Polymer.ResolveUrl.resolveUrl(assetPath,
- module.ownerDocument.baseURI);
- this._importPath = Polymer.ResolveUrl.pathFromUrl(importURL);
- } else {
- this._importPath = '';
- }
+ // NOTE: users setting `_importPath` is supported in Polymer 2.x but not
+ // 1.x.
+ if (module) {
+ var assetPath = module.getAttribute('assetpath') || '';
+ var importURL = Polymer.ResolveUrl.resolveUrl(assetPath,
+ module.ownerDocument.baseURI);
+ this._importPath = Polymer.ResolveUrl.pathFromUrl(importURL);
+ } else {
+ this._importPath = '';
}
// stick finger in footgun
if (this._template && this._template.hasAttribute('is')) {
diff --git a/test/unit/resolveurl.html b/test/unit/resolveurl.html
index b755aec9fa..416b720ef3 100644
--- a/test/unit/resolveurl.html
+++ b/test/unit/resolveurl.html
@@ -13,6 +13,11 @@
+
@@ -34,6 +39,26 @@
+
+
+
+
+
+
+
+
+
+
+
+