webshim icon indicating copy to clipboard operation
webshim copied to clipboard

Polyfiller.js is trying to load files from the wrong location

Open devlife opened this issue 14 years ago • 2 comments

I put everything in my /scripts folder: /scripts /shims /combos etc....

However, if I browse to http://localhost/something/else/ then the files that polyfiller is trying to load have the following url: http://localhost/something/else/shims/blah.js.

Is there any way to get this to look for http://localhost/scripts/shims/blah.js?

devlife avatar Sep 04 '12 20:09 devlife

changing Options path to shims folder

Shims folder is computed automatically. If the name of polyfiller.js is changed and the polyfill-script is loaded async, this computation can be wrong and you have to set the folder manually.

This generated path can be changed by changing the basePath configuration with the setOptions method.

$.webshims.setOptions("basePath", "/yourFolderTo/shims/"); 
//or: 
$.webshims.setOptions({ basePath: "/yourFolderTo/shims/" });

If you do not load it async and/or didn't re-name polyfiller.js, it's a bug and I need a test case. Is this happening in all browsers?

aFarkas avatar Sep 04 '12 20:09 aFarkas

Thanks for the quick response. I am just using the default settings. I set the basePath manually and all is well. Thanks!

devlife avatar Sep 04 '12 22:09 devlife