Issues with Bootstrap due to URL rewriting

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issues with Bootstrap due to URL rewriting

arnaldop
I have the following bundle for Bootstrap 3.2.0:
{
	"bundle": "bootstrap-3.2.0",
	"dependencies": ["jquery"],
	"assets": [
		{
			"name": "bootstrap",
			"version": "3.2.0",
			"type": "css",
			"locations": {
				"remote": "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
			}
		},
		{
			"name": "bootstrap-theme",
			"version": "3.2.0",
			"type": "css",
			"locations": {
				"remote": "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"
			}
		},
		{
			"name": "ie10-viewport-bug-workaround",
			"version": "3.2.0",
			"type": "js",
			"locations": {
				"classpath": "static/js/ie10-viewport-bug-workaround.js"
			}
		},
		{
			"name": "bootstrap",
			"version": "3.2.0",
			"type": "js",
			"locations": {
				"remote": "//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
			}
		}
	]
}

In my page I have the following:
<link rel="stylesheet" href="/dandelion-assets/c9c26bcb63b6ebb7945e8a6e9fa89aa6/f4748e573c75fd6119ef88c02d0f0f26/css/bootstrap-3.2.0.css"></link>
<link rel="stylesheet" href="/dandelion-assets/c9c26bcb63b6ebb7945e8a6e9fa89aa6/99a030d9c69c291271a7bbca5fcebe9f/css/bootstrap-theme-3.2.0.css"></link>

I also see in my page console that these resources cannot be loaded:
http://localhost:9000/dandelion-assets/871778dcdad14b046fdf8dddd9d80685/f4748e573c75fd6119ef88c02d0f0f26/fonts/glyphicons-halflings-regular.woff
http://localhost:9000/dandelion-assets/871778dcdad14b046fdf8dddd9d80685/f4748e573c75fd6119ef88c02d0f0f26/fonts/glyphicons-halflings-regular.ttf

Inside bootstrap-3.2.0.css I find:
src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff)

Since the CSS was downloaded locally, ".." refers to a local resource rather than a remote resource, which means that this and other resources (fonts, etc.) are not loaded.

I'm not sure what the solution to this would be other than parsing through all remote CSS and JS files, identify all of these external resources, download them locally, and include them in my bundle definition.

Am I doing something wrong? This way seems inefficient? I'm pretty sure that v0.10.0 handled this case.

Thanks!
Loading...